问题标签 [rational-purify]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1806 浏览

memory - Rational Purify not showing memory leak, run-time errors?

This might not appear like a programming question, but inherently deals with code.

I have a following piece of test-code, which has obvious errors like array index out of bounds, memory leak:-

This code is built on a MS-Visual Studio 2008.

I am trying to use Rational Purify (version 7.0) to identify run-time errors, memory leaks in my code. Towards after reading some pointers about how to build code for usage in Purify, i have done below things in the MSVS-2008 project settings:-

1.)Disable incremental link 2.) Debug information compiler flag is /Zi

3.) Set the Linker option - "Basic run-time checking to value Default.

4.) Added a extra linker option /fixed:no.

5.) Build config is debug, no optimization enabled.

Then i build and get the exe. I use this exe to run in Purify so that it instruments the same. But the output window in purify after running/instrumenting this exe, shows no errors about memory leak, ..etc which are present in the code above.

The purify output window shows output of different binaries (my exe file and some other system dlls) it instrumented loaded, executed. But in the output where is shows data about my exe, there is no error message.

My feeling is i am making a mistake in giving compilation/linker options while building the exe in MS-VS 2008.or The generated executable format is not compatible/understandable by Purify?

1.)What could be wrong here? What more options i could need while building the exe?

2.)Is my process of using Purify correct, or am i missing something? How can i get Purify to show all the errors in my program after doing run time analysis?

3.)Is there any other tool (free/commercial license)which can detecl memory leaks, array out of bound errors, use of uninitialized pointers, variables, memory corruption etc.. by doing run time analysis of C code.

Sorry for longish mail, but had to be clear.

thanks.

-AD

0 投票
0 回答
852 浏览

continuous-integration - 如何将 Purify 集成到 Hudson CI 中?

我设置了一个 Hudson CI 系统,目前它用于构建项目和运行一些单元测试。我的下一步是将内存泄漏检测器 Purify 集成到构建周期中。现在我想在 purify 中启动单元测试,为此我创建了一个新的批处理任务,它运行以下命令:

正如我在 Purify 文档中所读到的,使用 /SaveTextData 选项是为了在 GUI 模式下运行 purify。如果我在命令行中的本地工作站上运行此命令,它将完美运行。但如果它是由 Hudson 发起的,则不会发生任何事情。可惜没有净化记录...

有没有人尝试过通过 Hudson 或任何其他 CI 系统开始净化?

提前致谢。

此致

马丁

编辑:我忘了告诉你,我让 Hudson 在不同的计算机上作为主从运行。在主服务器上,我配置了一个任务,该任务应该在从服务器上的 purify 中启动单元测试。我正在通过 JNLP 运行从站。

编辑 18.03.2010:

好的,所以最后我更接近问题的根源。

我发现,在本地净化中运行我的单元测试,日志文件 EngineCmdLine.log 包含三个命令。

我开始使用以下命令进行净化:

手动启动净化时EngineCmdLine.log的输出:

文件:D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestRunnerConsoleWD.exe

文件:C:\WINDOWS\system32\ws2_32.dll

文件:D:\workspace\hudson\workspace\Purify_TestFW_CommonsCoreTest_Cpp_msvs9\TestDemoWD.dll

通过 Hudson 启动时的输出:

purify 的错误输出:

问题是,为什么 purify 使用 TestDemoWD.dll 库启动两次命令?

0 投票
1 回答
143 浏览

hp-ux - Purify: Error: Ran out of thread local data space in purify

我正在使用 aCC 3.85 在 Hp-UX 11.11B 上运行 purify 7.0。我将环境变量设置如下:export PURIFYOPTIONS="-max_threads=4000 -enable-thread-stack-change=yes"

但是我仍然收到以下错误,并且净化停止并出现以下错误消息:

净化:错误:线程本地数据空间不足。退出。当前最大线程数为 4000。要增加分配的线程数,请使用 (ksh) PURIFYOPTIONS="-max_threads=8000 $PURIFYOPTIONS"; 之类的命令 导出 PURIFYOPTIONS (csh) setenv PURIFYOPTIONS "-max_threads=8000 printenv PURIFYOPTIONS"

如果我输入 ="-max_threads=8000" 它再次要求将大小增加到 16000(将 PURIFYOPTIONS 变量中的任何内容加倍。

有人可以帮助解决这个问题吗?

0 投票
1 回答
1789 浏览

oracle - 如何使用 purify 从工具化中排除共享库?

工具化与 Oracle 的 libclntsh 链接的 C 代码会在运行生成的程序时导致崩溃。程序以“非法指令”信号终止。

至少在某些版本的 Oracle 11g 和 Purify 中存在该错误。

这是一个已知的错误,IBM 已发布了解决方法。不幸的是,解决方法对我的工作环境没有帮助。

我在用

在 Sun SPARC 硬件上的 Solaris 10 下。我用 Sun CC 11 编译 C 源代码。

就像解决方法中描述的那样,我尝试将 libclntsh 从工具化中排除,如下所示:

这不起作用。Purify 只是说它正在检测 libclntsh.so.11.1,当然我得到了一个相应的_pp3_文件而不是一个文件_pp0_

我尝试了排除模式的变体:

没有任何成功。

能够排除 libclntsh 也将大大缩短工具化时间。在这台 SPARC 机器上,工具化 libclntsh.so 需要几分钟时间。

看看解决方法,它只提到了 HPUX - 但我希望它也适用于 Solaris ......不知何故。

0 投票
1 回答
67 浏览

scons - 如何将 Purify 连接到 Scons?

我有一个对 scons 有各种调用的 Makefile。

SCons 命令生成类似于以下内容的行:

你如何将 Purify 融入到这个组合中?我猜这条线最终看起来像

0 投票
1 回答
220 浏览

c++ - Windows 中守护程序的代码覆盖率

我需要对守护进程进行代码覆盖。守护程序应用程序是用 C++ 编写的。我们使用具有自己的库的客户端测试程序来测试守护程序功能。库与守护程序通信。

我通常使用 IBM Rational PureCoverage。但是在这种情况下,当我运行客户端测试程序时,我只能访问客户端库而不是守护程序库。

有没有其他工具可以帮助解决这种情况?

谢谢。

0 投票
1 回答
1443 浏览

windows-7 - Rational PurifyPlus:在哪里购买?有替代品的经验吗?

我一直在网上寻找购买Rational PurifyPlus for Windows 的可能性。在我们公司,我们过去一直在使用 Purify,并希望将其替换为当前版本的许可证,因为我们需要支持 Windows 7。

2014 年底, IBM将 Rational 软件部门出售给了UNICOM Systems。直到今天,我还没有找到任何可以出售许可证的地方或商店。联通网站上连“如何购买”的栏目都没有!

使用该公司的联系表获取信息的尝试仍未得到答复。

如果您能够在去年购买该产品,如果您能与我分享您是如何实现这一目标的,那将会有所帮助。

或者,有人可以详细说明 Purify 的合适替代品吗?也许你最近为了别的事情放弃了 Purify 并且比以前更快乐?

非常感谢你。

0 投票
0 回答
104 浏览

c++ - 为什么 purify 工具在“throw true”语句中显示 IPR 错误?

在使用净化器进行内存检查时,它在以下语句中显示 IPR 错误。

可能是什么问题?

根据我的分析,旧版本的 purify 存在问题。但我使用的是最新版本。

0 投票
1 回答
31 浏览

purify - 是否有将文件从 .pv 转换为 .log 的自动化方法?

除了使用 purify -view 打开每个文件然后导出之外,有没有办法将 .pv 文件转换为文本文件?

我有很多 .pv 生成的文件,这些文件来自运行大量测试,我的可执行文件配备了 Rational 的 Purify。我知道我可以指定 -log-file=logfilename.log 在运行测试时生成输出的文本版本。但是我有数千个测试并且不想全部更新它们以更改使用的 -log-file 参数。