Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356789 - Memory leak in DwarfInfoReader as Jobs are kept by ProgressViewUpdater forever
Summary: Memory leak in DwarfInfoReader as Jobs are kept by ProgressViewUpdater forever
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-edc (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ken Ryall CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-06 05:57 EDT by Daniel Thomas CLA
Modified: 2019-12-30 18:39 EST (History)
2 users (show)

See Also:


Attachments
Patch creating a static ParseJob class to do the anonymous inner class Job's work and fix dispose method (4.68 KB, patch)
2011-09-06 05:58 EDT, Daniel Thomas CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Thomas CLA 2011-09-06 05:57:11 EDT
Build Identifier: 

ProgressViewUpdater keeps (by a few layers of indirection) references to all Jobs (or at least the ones we care about) so if a Job is an anonymous class or a non static member class then its reference to the parent class will keep that instance around forever as well. If a Job as in this case is only intended to be used once for a fairly brief period of time this results in a problem.

I have a patch which fixes this up and stops GC errors when analyzing multiple exes in a row (such as during some testing) results in a GC error as all data is accumulated.

Additionally DwarfDebugInfoProvider's dispose() method which would have mitigated this problem does not clear() all the things it should allowing references to everything to persist.

I have a patch which fixes this.

Reproducible: Always
Comment 1 Daniel Thomas CLA 2011-09-06 05:58:52 EDT
Created attachment 202793 [details]
Patch creating a static ParseJob class to do the anonymous inner class Job's work and fix dispose method
Comment 2 Kirk Beitz CLA 2011-09-06 17:21:55 EDT
i've nominally tested this using our JUnit suite (including the edc JUnit suite), and have committed it to our local repository, pending final review and eclipse edc git merge by committer ken ryall.
Comment 3 Jonah Graham CLA 2019-12-30 18:39:28 EST
(this is part of a batch change)

The Eclipse CDT EDC (https://wiki.eclipse.org/CDT/cdt-debug-edc) is now obsolete and has not had any active development since 2011. Therefore the still open bugs are being marked as wontfix.

The git repo for the project still exists for posterity at https://git.eclipse.org/c/cdt/org.eclipse.cdt.edc.git/