6700107: java/lang/Class/forName/TooManyDimensions.java crashes with SIGSEGV in c2 compiler with fastdebug
Summary: objArrayKlass::compute_modifier_flags was unnecessarily recursive
Reviewed-by: kamg
--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp Thu Oct 09 12:06:22 2008 -0400
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp Tue Oct 14 10:15:33 2008 -0400
@@ -475,8 +475,8 @@
assert(Universe::is_bootstrapping(), "partial objArray only at startup");
return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC;
}
- // Recurse down the element list
- jint element_flags = Klass::cast(element_klass())->compute_modifier_flags(CHECK_0);
+ // Return the flags of the bottom element type.
+ jint element_flags = Klass::cast(bottom_klass())->compute_modifier_flags(CHECK_0);
return (element_flags & (JVM_ACC_PUBLIC | JVM_ACC_PRIVATE | JVM_ACC_PROTECTED))
| (JVM_ACC_ABSTRACT | JVM_ACC_FINAL);