changeset 4280:5939f5953b45

8009836: nsk/regression/b4222717 fails with empty stack trace Summary: Some zeroing was missed for bug 8003553, causing empty stack traces and Xcom crashes, add back zeroing to metablock Reviewed-by: dholmes, rbackman
author coleenp
date Wed, 13 Mar 2013 09:10:35 -0400
parents 35ef86296a5d
children d6320e955c89
files src/share/vm/memory/metablock.cpp src/share/vm/oops/constMethod.cpp src/share/vm/oops/method.cpp
diffstat 3 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/metablock.cpp	Fri Mar 08 17:49:52 2013 -0800
+++ b/src/share/vm/memory/metablock.cpp	Wed Mar 13 09:10:35 2013 -0400
@@ -65,9 +65,10 @@
   }
 
   Metablock* result = (Metablock*) p;
+
+  // Clear the memory
+  Copy::fill_to_aligned_words((HeapWord*)result, word_size);
 #ifdef ASSERT
-  // Add just to catch missing initializations
-  Copy::fill_to_words((HeapWord*) result, word_size, 0xf1f1f1f1);
   result->set_word_size(word_size);
 #endif
   return result;
--- a/src/share/vm/oops/constMethod.cpp	Fri Mar 08 17:49:52 2013 -0800
+++ b/src/share/vm/oops/constMethod.cpp	Wed Mar 13 09:10:35 2013 -0400
@@ -55,7 +55,7 @@
   set_stackmap_data(NULL);
   set_code_size(byte_code_size);
   set_constMethod_size(size);
-  set_inlined_tables_length(sizes);
+  set_inlined_tables_length(sizes); // sets _flags
   set_method_type(method_type);
   assert(this->size() == size, "wrong size for object");
   set_name_index(0);
@@ -64,6 +64,7 @@
   set_max_stack(0);
   set_max_locals(0);
   set_method_idnum(0);
+  set_size_of_parameters(0);
 }
 
 
--- a/src/share/vm/oops/method.cpp	Fri Mar 08 17:49:52 2013 -0800
+++ b/src/share/vm/oops/method.cpp	Wed Mar 13 09:10:35 2013 -0400
@@ -87,6 +87,9 @@
 #endif
   set_intrinsic_id(vmIntrinsics::_none);
   set_jfr_towrite(false);
+  set_force_inline(false);
+  set_hidden(false);
+  set_dont_inline(false);
   set_method_data(NULL);
   set_interpreter_throwout_count(0);
   set_vtable_index(Method::garbage_vtable_index);