changeset 2877:deabc521f9d2

Add backport of 7197906 and alternate memory leak fix for 7017193. 2013-03-19 Andrew John Hughes <gnu.andrew@redhat.com> * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * patches/openjdk/7197906-handle_32_bit_shifts.patch: Backport from OpenJDK 7. * patches/fix_get_stack_bounds_leak.patch: Add a much simpler fix for 7017193 using free which doesn't suffer from the performance issues in https://bugzilla.redhat.com/show_bug.cgi?id=902004 * NEWS: Updated.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Wed, 20 Mar 2013 09:27:20 +0000
parents d11c7c20b7b9
children 85113f382f7b
files ChangeLog Makefile.am NEWS patches/fix_get_stack_bounds_leak.patch patches/openjdk/7197906-handle_32_bit_shifts.patch
diffstat 5 files changed, 65 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Mar 12 18:39:47 2013 +0000
+++ b/ChangeLog	Wed Mar 20 09:27:20 2013 +0000
@@ -1,3 +1,15 @@
+2013-03-19  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patches.
+	* patches/openjdk/7197906-handle_32_bit_shifts.patch:
+	Backport from OpenJDK 7.
+	* patches/fix_get_stack_bounds_leak.patch:
+	Add a much simpler fix for 7017193 using
+	free which doesn't suffer from the performance issues in
+	https://bugzilla.redhat.com/show_bug.cgi?id=902004
+	* NEWS: Updated.
+
 2013-03-12  Andrew John Hughes  <gnu.andrew@member.fsf.org>
 
 	* configure.ac: Bump to 1.11.10pre.
--- a/Makefile.am	Tue Mar 12 18:39:47 2013 +0000
+++ b/Makefile.am	Wed Mar 20 09:27:20 2013 +0000
@@ -501,7 +501,9 @@
 	patches/openjdk/8004341-jck_dialog_failure-02.patch \
 	patches/pr1319-support_giflib_5.patch \
 	patches/openjdk/8007393.patch \
-	patches/openjdk/8007611.patch
+	patches/openjdk/8007611.patch \
+	patches/fix_get_stack_bounds_leak.patch \
+	patches/openjdk/7197906-handle_32_bit_shifts.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
--- a/NEWS	Tue Mar 12 18:39:47 2013 +0000
+++ b/NEWS	Wed Mar 20 09:27:20 2013 +0000
@@ -12,6 +12,11 @@
 
 New in release 1.11.10 (2013-04-XX):
 
+* Backports
+  - S7197906: BlockOffsetArray::power_to_cards_back() needs to handle > 32 bit shifts
+* Bug fixes
+  - Fix get_stack_bounds memory leak (alternate fix for S7197906)
+
 New in release 1.11.9 (2013-03-04):
 
 * Security fixes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/fix_get_stack_bounds_leak.patch	Wed Mar 20 09:27:20 2013 +0000
@@ -0,0 +1,12 @@
+diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -2650,6 +2650,8 @@
+     ssize_t len = getline(&str, &dummy, f);
+     if (len == -1) {
+       fclose(f);
++      if (str != NULL)
++	free(str);
+       return false;
+     }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7197906-handle_32_bit_shifts.patch	Wed Mar 20 09:27:20 2013 +0000
@@ -0,0 +1,33 @@
+--- openjdk/hotspot/src/share/vm/memory/blockOffsetTable.hpp	2012-09-13 21:22:37.897456500 +0200
++++ openjdk/hotspot/src/share/vm/memory/blockOffsetTable.hpp	2012-09-13 21:22:34.345253300 +0200
+@@ -285,7 +285,7 @@
+   };
+ 
+   static size_t power_to_cards_back(uint i) {
+-    return (size_t)(1 << (LogBase * i));
++    return (size_t)1 << (LogBase * i);
+   }
+   static size_t power_to_words_back(uint i) {
+     return power_to_cards_back(i) * N_words;
+--- openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2012-09-13 21:22:37.901456800 +0200
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	2012-09-13 21:22:34.354253900 +0200
+@@ -110,7 +110,7 @@
+ #ifndef PRODUCT
+ bool CMBitMapRO::covers(ReservedSpace rs) const {
+   // assert(_bm.map() == _virtual_space.low(), "map inconsistency");
+-  assert(((size_t)_bm.size() * (size_t)(1 << _shifter)) == _bmWordSize,
++  assert(((size_t)_bm.size() * ((size_t)1 << _shifter)) == _bmWordSize,
+          "size inconsistency");
+   return _bmStartWord == (HeapWord*)(rs.base()) &&
+          _bmWordSize  == rs.size()>>LogHeapWordSize;
+--- openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2012-09-13 21:22:37.898456600 +0200
++++ openjdk/hotspot/src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp	2012-09-13 21:22:34.346253400 +0200
+@@ -273,7 +273,7 @@
+   if (_max_fine_entries == 0) {
+     assert(_mod_max_fine_entries_mask == 0, "Both or none.");
+     size_t max_entries_log = (size_t)log2_long((jlong)G1RSetRegionEntries);
+-    _max_fine_entries = (size_t)(1 << max_entries_log);
++    _max_fine_entries = (size_t)1 << max_entries_log;
+     _mod_max_fine_entries_mask = _max_fine_entries - 1;
+ 
+     assert(_fine_eviction_sample_size == 0