Rational Purify 无法跳转到内存泄漏
因此,我的公司使用一个名为 Rational Purify(作为 Microsoft Visual Developer Studio 的插件)的令人愉快的错误程序来管理内存泄漏。 该程序旨在让您在遇到内存泄漏后单击它,然后跳转到发生泄漏的行。
不幸的是,Purify 出现故障,Purify 不会跳转到发生泄漏的地方,它只会提及发生泄漏的类和方法。不幸的是,有时这与雇用一名向导来帮助你猎熊并让他指点一样有用。到森林里并告诉你那里有熊。
有 Purify 经验的人知道我如何解决这个问题或者有一本很好的手册可以看吗?
So my company uses a delightfully buggy program called Rational Purify (as a plugin to Microsoft Visual Developer Studio) to manage memory leaks. The program is deigned to let you click on a memory leak after you have encountered it, and then jump to the line that the leak occurs on.
Unfortunately Purify is malfunctioning and Purify will not jump to the place that the leak occurred it only mentions the class and method that the leak occurs in. Unfortunately, sometimes this is about as useful as hiring a guide to help you hunt bears and having him point to the forest and tell you there are bears there.
Does anyone with Purify experience have any idea how I might fix this problem or have a good manual to look though?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Purify 就像一把瑞士刀。 如果你知道如何使用它,你会得到一些结果,虽然不是最好的,但仍然是结果。 如果不这样做,它就会崩溃,因为它只是 Windows 上运行的另一个程序。
最后,你需要很大的耐心、重建和一点运气。
Purify is like a swiss knife. If you know how to use it, you will get some results, not the best but still results. If you don't, it will crash, because it is just another program running on Windows.
In the end you will need a lot of patience, rebuilds and a bit of luck.
Purify 附带一个名为 ScanVSSolutionForPurifyPlus.pl 的脚本,它将确保您的项目文件具有 Purify 正常工作的所有正确设置。 如果您还没有运行过,请尝试一下。
(我个人在一个大型解决方案上使用过 ScanVSSolutionForPurifyPlus.pl,它的工作方式非常神奇。需要注意的是:当您为其指定
.sln
文件的名称时,您可能需要为其指定完整路径名。)Purify comes with a script called ScanVSSolutionForPurifyPlus.pl which will ensure that your project files have all the right settings for Purify to work properly. If you haven't run it, give it a go.
(I've personally used ScanVSSolutionForPurifyPlus.pl on a large solution, and it worked like a charm. One caveat: when you give it the name of your
.sln
file, you might need to give it the full pathname.)你确定你有调试版本吗? 或者更确切地说,您已启用所有 PDB? 在可执行文件上尝试 WindDbg 并使用 !lmi 命令检查可见内容。
整个代码是否正确检测?
还可以考虑使用其他工具,例如免费的 Visual Leak Detector 或 Microsoft 的工具 LeakDiag。
Are you sure you have debug build? Or rather you have all PDB's enabled? Try WindDbg on your executable and check with !lmi command what is visible.
Is whole code properly instrumented?
Also consider using something else like free Visual Leak Detector or Microsoft's tool LeakDiag.
我大约 5 年前使用过 Purify。 那时真的很片面。 他们一直承诺在“下一个版本”中修复所有错误。 我们最终放弃了它。 人们只能想知道他们是否在他们的产品上使用了自己的质量保证工具。 噢,讽刺的是……
I used Purify about 5 years ago. It was really flaky then. They kept promising to fix all the bugs in the 'next release'. We gave up on it in the end. One can only wonder if they used their own QA tools on their products. Oh the irony...
一般来说,您有两种选择,一种是从 Purify 的检测中排除模块 DLL,有时它会有所帮助。 其次是获取 BoundsChecker,这会使编译时检测速度慢得多,但详细程度要好一个数量级。
当我们知道存在错误/崩溃时,我们通常使用 Purify 进行签入、健全性检查和 BoundsChecker。
BoundsChecker 有一些不错的功能,例如仅仪器文件 A.cpp 和 A.cpp。 B.cpp,排除所有其余的。
请注意,这两个应用程序都无法在 64 位操作系统上运行,并且 BoundsChecker 不会安装在 64 位操作系统上。 如果您切换到带有 32 位后端口的本机 64 位开发,那是最令人沮丧的!
Generally you have two options, one exclude modules DLL's from instrumentation in Purify, it helps some times. Second is get BoundsChecker, this does compile time instrumentation much slower but the level of detail is an order of magnitude better.
We generally use Purify on check-in, sanity checking, and BoundsChecker when we know a bug/crash exists.
BoundsChecker has some nice features like only instrument files A.cpp & B.cpp, excluding all the rest.
Be aware neither of these two applications function on 64 bit operating systems, and BoundsChecker will not install on 64 bit OS. Most frustrating if you make the switch to native 64 bit development with 32 bit back port!