Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334648

Summary: Possible issues in the native code
Product: [Eclipse Project] Equinox Reporter: Niels Thykier <niels>
Component: LauncherAssignee: Project Inbox <equinox.launcher-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, tjwatson
Version: unspecified   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
cppcheck 2>equinox.cppcheck.log none

Description Niels Thykier CLA 2011-01-18 09:35:51 EST
Build Identifier: 

Hi

cppcheck (1.44) has found a couple of possible issues in org.eclipse.equinox.executable with the usage of realloc and a couple of possible memory leaks.

I will attach a log

~Niels


Reproducible: Always
Comment 1 Niels Thykier CLA 2011-01-18 09:38:47 EST
Created attachment 187000 [details]
cppcheck 2>equinox.cppcheck.log

So I believe this one is a false-positive:
[framework/bundles/org.eclipse.equinox.executable/library/eclipse.c:666]: (error) Memory leak: javaResults.errorMessage

The realloc generally appears to be valid and I have manually verified
[framework/bundles/org.eclipse.equinox.executable/library/motif/eclipseMotifInit.c:108]: (error) Memory leak: path

~Niels
Comment 2 Niels Thykier CLA 2011-01-18 09:41:50 EST
Right, I should probably note I checked out the code from CVS from [1].

~Niels

[1] http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.equinox/framework/bundles/org.eclipse.equinox.executable/?root=RT_Project
Comment 3 Andrew Niefer CLA 2011-03-18 16:14:50 EDT
I have fixed the memory leak in eclipseMotifInit