Community
Participate
Working Groups
I am trying to run unit tests through massif to see if there is a memory leak, however after executing a few tests, the Valgrind plugin always fails with an EmptyStackException. Checking the workspace .log file reveals the following stack trace: !ENTRY org.eclipse.core.jobs 4 2 2010-09-13 11:46:12.937 !MESSAGE An internal error occurred during: "Launching tests (1)". !STACK 0 java.util.EmptyStackException at java.util.Stack.peek(Stack.java:102) at org.eclipse.linuxtools.internal.valgrind.core.ValgrindCoreParser.<init>(ValgrindCoreParser.java:70) at org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate.parseLogs(ValgrindLaunchConfigurationDelegate.java:194) at org.eclipse.linuxtools.internal.valgrind.launch.ValgrindLaunchConfigurationDelegate.launch(ValgrindLaunchConfigurationDelegate.java:160) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) The environment is the following: eclipse.buildId=I20100608-0911 java.version=1.6.0_0 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.cpp.product Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.cpp.product
Would you be able to post the log file valgrind_[pid].txt located in [workspace]/.metadata/.plugins/org.eclipse.linuxtools.valgrind.launch?
Created attachment 178766 [details] Valgrind log file As requested in comment #1. Class and method names have been obfuscated.
I am able to reproduce the problem by passing a negative integer to new[]. This is an oversight in parsing Valgrind's log files. I'll commit a fix soon. If you wish there's a macro defined in valgrind.h: RUNNING_ON_VALGRIND that will allow you to disable certain tests if running under Valgrind. You can read more about it here: http://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
Problem should be fixed in trunk and 0.6 branch.
(In reply to comment #4) > Problem should be fixed in trunk and 0.6 branch. Thanks for the quick fix. I am not sure how to get the latest build though. Linux Tools nighly builds have the name "0.7.0.201008311204" so they seem to be two weeks old. The last 0.6 branch release was end of August. Which update site should I thus use or where can I get a packaged build?
(In reply to comment #5) > (In reply to comment #4) > > Problem should be fixed in trunk and 0.6 branch. > > Thanks for the quick fix. > > I am not sure how to get the latest build though. Linux Tools nighly builds > have the name "0.7.0.201008311204" so they seem to be two weeks old. The last > 0.6 branch release was end of August. > > Which update site should I thus use or where can I get a packaged build? You're welcome to use the Helios nightly update site: http://download.eclipse.org/technology/linuxtools/updates-nightly-helios/ Please let me know if the problem persists for you, but it should be fixed.
(In reply to comment #6) > Please let me know if the problem persists for you, but it should be fixed. Thanks, got the update and parsing works now. The issue is fixed for me.