Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334648 - Possible issues in the native code
Summary: Possible issues in the native code
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 09:35 EST by Niels Thykier CLA
Modified: 2011-03-18 16:14 EDT (History)
2 users (show)

See Also:


Attachments
cppcheck 2>equinox.cppcheck.log (1.62 KB, application/octet-stream)
2011-01-18 09:38 EST, Niels Thykier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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