view patches/security/20100330/6932480.patch @ 1723:d48a4f542e7d

Add new security patches and fix srcdir!=builddir issues. 2009-03-30 Andrew John Hughes <ahughes@redhat.com> * patches/icedtea-systemtap.patch: Moved to HotSpot-specific patch tree. * Makefile.am: Add new security patches and add $(HSBUILD) to systemtap patch. Put copied OpenJDK files in openjdk-copy rather than a duplicate rt directory in the build tree. * NEWS: List new security patches. * patches/hotspot/default/systemtap.patch: From patches/icedtea-systemtap.patch. * patches/hotspot/original/icedtea-format.patch, * patches/hotspot/original/systemtap.patch: Added for original HotSpot build. * patches/security/20100330/6626217.patch, * patches/security/20100330/6633872.patch, * patches/security/20100330/6639665.patch, * patches/security/20100330/6736390.patch, * patches/security/20100330/6745393.patch, * patches/security/20100330/6887703.patch, * patches/security/20100330/6888149.patch, * patches/security/20100330/6892265.patch, * patches/security/20100330/6893947.patch, * patches/security/20100330/6893954.patch, * patches/security/20100330/6898622.patch, * patches/security/20100330/6898739.patch, * patches/security/20100330/6899653.patch, * patches/security/20100330/6902299.patch, * patches/security/20100330/6904691.patch, * patches/security/20100330/6909597.patch, * patches/security/20100330/6910590.patch, * patches/security/20100330/6914823.patch, * patches/security/20100330/6914866.patch, * patches/security/20100330/6932480.patch, * patches/security/20100330/hotspot/default/6894807.patch, * patches/security/20100330/hotspot/original/6894807.patch: New security and hardening patches http://www.oracle.com/technology/deploy/security/critical-patch-updates/javacpumar2010.html
author Andrew John Hughes <ahughes@redhat.com>
date Tue, 30 Mar 2010 23:04:54 +0100
parents
children
line wrap: on
line source

# HG changeset patch
# User acorn
# Date 1268677738 14400
# Node ID 77940ab6c3558ccc1b859a2e28cb0db440d9f5b6
# Parent  9d4986fcac2a07806ffed8a33184da149f76719b
6932480: Crash in CompilerThread/Parser. Unloaded array klass?
Summary: Restore code deleted in 6626217
Reviewed-by: asaha, kevinw

diff --git openjdk.orig/hotspot/src/share/vm/ci/ciEnv.cpp openjdk/hotspot/src/share/vm/ci/ciEnv.cpp
--- openjdk.orig/hotspot/src/share/vm/ci/ciEnv.cpp
+++ openjdk/hotspot/src/share/vm/ci/ciEnv.cpp
@@ -343,6 +343,30 @@ ciKlass* ciEnv::get_klass_by_name_impl(c
     found_klass =
       SystemDictionary::find_instance_or_array_klass(sym, loader, domain,
                                                      KILL_COMPILE_ON_FATAL_(fail_type));
+  }
+
+  // If we fail to find an array klass, look again for its element type.
+  // The element type may be available either locally or via constraints.
+  // In either case, if we can find the element type in the system dictionary,
+  // we must build an array type around it.  The CI requires array klasses
+  // to be loaded if their element klasses are loaded, except when memory
+  // is exhausted.
+  if (sym->byte_at(0) == '[' &&
+      (sym->byte_at(1) == '[' || sym->byte_at(1) == 'L')) {
+    // We have an unloaded array.
+    // Build it on the fly if the element class exists.
+    symbolOop elem_sym = oopFactory::new_symbol(sym->as_utf8()+1,
+                                                sym->utf8_length()-1,
+                                                KILL_COMPILE_ON_FATAL_(fail_type));
+    // Get element ciKlass recursively.
+    ciKlass* elem_klass =
+      get_klass_by_name_impl(accessing_klass,
+                             get_object(elem_sym)->as_symbol(),
+                             require_local);
+    if (elem_klass != NULL && elem_klass->is_loaded()) {
+      // Now make an array for it
+      return ciObjArrayKlass::make_impl(elem_klass);
+    }
   }
 
   if (found_klass != NULL) {