changeset 2922:c8b86d52aabc

Add backport for HotSpot suggested by Xerxes. 2013-03-26 Andrew John Hughes <gnu.andrew@redhat.com> * Makefile.am: (ICEDTEA_PATCHES): Add new backport. * patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch: Backport suggested by Xerxes for hs20.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Tue, 03 Sep 2013 15:52:04 +0100
parents 2ef554b75510
children ec88ef4eca25
files ChangeLog Makefile.am patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch
diffstat 3 files changed, 41 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Sep 03 15:27:53 2013 +0100
+++ b/ChangeLog	Tue Sep 03 15:52:04 2013 +0100
@@ -1,3 +1,10 @@
+2013-03-26  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new backport.
+	* patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch:
+	Backport suggested by Xerxes for hs20.
+
 2013-02-17  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	* .hgignore: Fix so the cacao patches directory
--- a/Makefile.am	Tue Sep 03 15:27:53 2013 +0100
+++ b/Makefile.am	Tue Sep 03 15:52:04 2013 +0100
@@ -651,8 +651,8 @@
 	patches/openjdk/7158483-tzdata2012c.patch \
 	patches/openjdk/7198570-tzdata2012f.patch \
 	patches/openjdk/8002225-tzdata2012i.patch \
-	patches/openjdk/8009987-tzdata2013b.patch
-
+	patches/openjdk/8009987-tzdata2013b.patch \
+	patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch	Tue Sep 03 15:52:04 2013 +0100
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User coleenp
+# Date 1297874084 18000
+# Node ID c08677f982895c7e89d370768ec261c00b0d6e2d
+# Parent  5415131bc5ab69d30d14636e414d1fa400800408
+6840152: JVM crashes when heavyweight monitors are used
+Summary: Turn off biased locking if !UseFastLocking or UseHeavyMonitors options are requested.
+Reviewed-by: phh, never, dcubed, dholmes
+
+diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp
+--- openjdk/hotspot/src/share/vm/runtime/arguments.cpp
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+@@ -3103,6 +3103,19 @@
+   // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
+   set_aggressive_opts_flags();
+ 
++  // Turn off biased locking for locking debug mode flags,
++  // which are subtlely different from each other but neither works with
++  // biased locking.
++  if (!UseFastLocking || UseHeavyMonitors) {
++    if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {
++      // flag set to true on command line; warn the user that they
++      // can't enable biased locking here
++      warning("Biased Locking is not supported with locking debug flags"
++              "; ignoring UseBiasedLocking flag." );
++    }
++    UseBiasedLocking = false;
++  }
++
+ #ifdef CC_INTERP
+   // Clear flags not supported by the C++ interpreter
+   FLAG_SET_DEFAULT(ProfileInterpreter, false);