JDK-6354559 : Labels can leak C heap memory
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2005-11-23
  • Updated: 2012-10-08
  • Resolved: 2006-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b75Fixed
Related Reports
Relates :  
Description
As part of the fix for 5039499 Labels can allocate C heap memory which is normally cleaned up by its destructor.  The problem is that Labels can be created as part of other resource objects, which never get their destructor called so it's destructor is never called resulting in leaks of C heap.  I think it's error prone to rely on the execution of the destructor for this cleanup and in particular C1 does no such cleanup.  The destruction of the CodeSection or CodeBuffer associated with the Label should force the release of any storage associated with the Labels so that Label users don't have to worry about it.

Comments
SUGGESTED FIX http://analemma.sfbay.sun.com/net/prt-archiver.sfbay/data/archived_workspaces/main/c2_baseline/2006/20060227123051.never.labels/workspace/webrevs/webrev-2006.02.27/index.html
27-02-2006

EVALUATION It's a small leak but we shouldn't go out with any new leaks.
08-12-2005