# HG changeset patch # User Andrew John Hughes # Date 1384549056 0 # Node ID eedd8076f56bd2b463c1606329352e314b7b21bb # Parent e319de2968f38620248b675cc7bf2de315f7bdad Add backport for HotSpot suggested by Xerxes. 2013-03-26 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Add new backport. * patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch: Backport suggested by Xerxes for hs20. diff -r e319de2968f3 -r eedd8076f56b ChangeLog --- a/ChangeLog Thu Aug 29 17:42:01 2013 +0100 +++ b/ChangeLog Fri Nov 15 20:57:36 2013 +0000 @@ -1,3 +1,10 @@ +2013-03-26 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Add new backport. + * patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch: + Backport suggested by Xerxes for hs20. + 2013-08-29 Andrew John Hughes * Makefile.am: diff -r e319de2968f3 -r eedd8076f56b Makefile.am --- a/Makefile.am Thu Aug 29 17:42:01 2013 +0100 +++ b/Makefile.am Fri Nov 15 20:57:36 2013 +0000 @@ -710,7 +710,8 @@ patches/openjdk/6636370-appcontext_simplification.patch \ patches/openjdk/6636331-appcontext_concurrentmodificationexception.patch \ patches/openjdk/8014469-tzdata2013c.patch \ - patches/openjdk/8020054-tzdata2013d.patch + patches/openjdk/8020054-tzdata2013d.patch \ + patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch if WITH_RHINO ICEDTEA_PATCHES += \ diff -r e319de2968f3 -r eedd8076f56b patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6840152-jvm_crashes_with_heavyweight_monitors.patch Fri Nov 15 20:57:36 2013 +0000 @@ -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);