United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7042126 (alt-rt) HashMap.clone implementation should be re-examined
JDK-7042126 : (alt-rt) HashMap.clone implementation should be re-examined

Details
Type:
Bug
Submit Date:
2011-05-05
Status:
Resolved
Updated Date:
2013-06-26
Project Name:
JDK
Resolved Date:
2013-01-29
Component:
core-libs
OS:
linux
Sub-Component:
java.util:collections
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u40 (master)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux local 2.6.18-194.26.1.el5 #1 SMP Fri Oct 29 14:21:16 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
When AggressiveOpts is enabled, the altclass version of HashMap#clone has a memory leak issue. Cloned copies of will retain a reference to their "parent" and so the original HashMap will remain live for the life of the cloned copy.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Do not use HashMap#clone() in conjunction with -XX:+AggressiveOpts.

                                    

Comments
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/90dbf16c7058
User:  robm
Date:  2013-02-01 00:54:45 +0000

                                     
2013-02-01
URL:   http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/90dbf16c7058
User:  lana
Date:  2013-02-11 18:23:50 +0000

                                     
2013-02-11



Hardware and Software, Engineered to Work Together