changeset 3159:363ac43421a9

S7161796, RH1151372: PhaseStringOpts::fetch_static_field tries to fetch field from the Klass instead of the mirror S8000897, RH1155012: VM crash in CompileBroker 2014-10-23 Andrew John Hughes <gnu.andrew@redhat.com> * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * NEWS: Updated. Add RH bugzilla ID to 7122142 also. * patches/openjdk/7161796-wrong_fetch_in_fetch_static_field.patch: Fix for HotSpot bug hit by 7122142. * patches/openjdk/8000897-use_corresponding_digest_length.patch: Fix for SHA-2 bug discovered in RH1155012.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Thu, 23 Oct 2014 18:39:22 +0100
parents d6de75aff3d0
children 3ffc944aeaac
files ChangeLog Makefile.am NEWS patches/openjdk/7161796-wrong_fetch_in_fetch_static_field.patch patches/openjdk/8000897-use_corresponding_digest_length.patch
diffstat 5 files changed, 86 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 16 00:15:12 2014 +0100
+++ b/ChangeLog	Thu Oct 23 18:39:22 2014 +0100
@@ -1,3 +1,14 @@
+2014-10-23  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patches.
+	* NEWS: Updated. Add RH bugzilla ID to
+	7122142 also.
+	* patches/openjdk/7161796-wrong_fetch_in_fetch_static_field.patch:
+	Fix for HotSpot bug hit by 7122142.
+	* patches/openjdk/8000897-use_corresponding_digest_length.patch:
+	Fix for SHA-2 bug discovered in RH1155012.
+
 2014-10-15  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	PR2033: patches/ecj/jaxws-getdtdtype.patch no
--- a/Makefile.am	Thu Oct 16 00:15:12 2014 +0100
+++ b/Makefile.am	Thu Oct 23 18:39:22 2014 +0100
@@ -629,7 +629,9 @@
 	patches/openjdk/7106773-512_bits_rsa.patch \
 	patches/pr1904-icedtea_and_distro_versioning.patch \
 	patches/openjdk/8017173-xml_cipher_rsa_oaep_cant_be_instantiated.patch \
-	patches/openjdk/7122142-annotation_race_condition.patch
+	patches/openjdk/7122142-annotation_race_condition.patch \
+	patches/openjdk/7161796-wrong_fetch_in_fetch_static_field.patch \
+	patches/openjdk/8000897-use_corresponding_digest_length.patch
 
 if WITH_RHINO
 ICEDTEA_PATCHES += \
--- a/NEWS	Thu Oct 16 00:15:12 2014 +0100
+++ b/NEWS	Thu Oct 23 18:39:22 2014 +0100
@@ -19,8 +19,10 @@
   - S6727719: Performance of TextLayout.getBounds()
   - S6745225: Memory leak while drawing Attributed String
   - S6904962: GlyphVector.getVisualBounds should not be affected by leading or trailing white space.
-  - S7122142: (ann) Race condition between isAnnotationPresent and getAnnotations
+  - S7122142, RH1151372: (ann) Race condition between isAnnotationPresent and getAnnotations
   - S7151089: PS NUMA: NUMA allocator should not attempt to free pages when using SHM large pages
+  - S7161796, RH1151372: PhaseStringOpts::fetch_static_field tries to fetch field from the Klass instead of the mirror
+  - S8000897, RH1155012: VM crash in CompileBroker
   - S8013057: Detect mmap() commit failures in Linux and Solaris os::commit_memory() impls and call vm_exit_out_of_memory()
   - S8026887: Make issues due to failed large pages allocations easier to debug
 * Bug fixes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/7161796-wrong_fetch_in_fetch_static_field.patch	Thu Oct 23 18:39:22 2014 +0100
@@ -0,0 +1,40 @@
+# HG changeset patch
+# User never
+# Date 1334790514 25200
+#      Wed Apr 18 16:08:34 2012 -0700
+# Node ID df3d4a91f7f6fa003ca8e2c6a0b73b01eb0fb8fa
+# Parent  847da049d62fd7a6c619788e50a57e6b8ffef80f
+7161796: PhaseStringOpts::fetch_static_field tries to fetch field from the Klass instead of the mirror
+Reviewed-by: twisti
+
+diff -r 847da049d62f -r df3d4a91f7f6 src/share/vm/opto/stringopts.cpp
+--- openjdk/hotspot/src/share/vm/opto/stringopts.cpp	Tue Apr 17 11:04:22 2012 -0700
++++ openjdk/hotspot/src/share/vm/opto/stringopts.cpp	Wed Apr 18 16:08:34 2012 -0700
+@@ -897,8 +897,8 @@
+ }
+ 
+ Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
+-  const TypeKlassPtr* klass_type = TypeKlassPtr::make(field->holder());
+-  Node* klass_node = __ makecon(klass_type);
++  const TypeInstPtr* mirror_type = TypeInstPtr::make(field->holder()->java_mirror());
++  Node* klass_node = __ makecon(mirror_type);
+   BasicType bt = field->layout_type();
+   ciType* field_klass = field->type();
+ 
+@@ -913,6 +913,7 @@
+       // and may yield a vacuous result if the field is of interface type.
+       type = TypeOopPtr::make_from_constant(con, true)->isa_oopptr();
+       assert(type != NULL, "field singleton type must be consistent");
++      return __ makecon(type);
+     } else {
+       type = TypeOopPtr::make_from_klass(field_klass->as_klass());
+     }
+@@ -922,7 +923,7 @@
+ 
+   return kit.make_load(NULL, kit.basic_plus_adr(klass_node, field->offset_in_bytes()),
+                        type, T_OBJECT,
+-                       C->get_alias_index(klass_type->add_offset(field->offset_in_bytes())));
++                       C->get_alias_index(mirror_type->add_offset(field->offset_in_bytes())));
+ }
+ 
+ Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/openjdk/8000897-use_corresponding_digest_length.patch	Thu Oct 23 18:39:22 2014 +0100
@@ -0,0 +1,29 @@
+# HG changeset patch
+# User valeriep
+# Date 1361905960 28800
+#      Tue Feb 26 11:12:40 2013 -0800
+# Node ID 5ffba58b541fb00dfd38a5ad5bc3ac7d8156f03f
+# Parent  210fb90ee33ad4785f949fdbae4b0e75f73f576c
+8000897: VM crash in CompileBroker
+Summary: Fixed to use the corresponding digest length when generating output.
+Reviewed-by: mullan
+
+diff -r 210fb90ee33a -r 5ffba58b541f src/share/classes/sun/security/provider/SHA2.java
+--- openjdk/jdk/src/share/classes/sun/security/provider/SHA2.java	Wed Feb 13 10:40:31 2013 +0000
++++ openjdk/jdk/src/share/classes/sun/security/provider/SHA2.java	Tue Feb 26 11:12:40 2013 -0800
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+  *
+  * This code is free software; you can redistribute it and/or modify it
+@@ -101,7 +101,7 @@
+         i2bBig4((int)bitsProcessed, buffer, 60);
+         implCompress(buffer, 0);
+ 
+-        i2bBig(state, 0, out, ofs, 32);
++        i2bBig(state, 0, out, ofs, engineGetDigestLength());
+     }
+ 
+     /**