diff src/share/vm/asm/codeBuffer.cpp @ 1685:0e35fa8ebccd

6973963: SEGV in ciBlock::start_bci() with EA Summary: Added more checks into ResourceObj and growableArray to verify correctness of allocation type. Reviewed-by: never, coleenp, dholmes
author kvn
date Tue, 03 Aug 2010 15:55:03 -0700
parents d93949c5bdcc
children 3e8fbc61cee8
line wrap: on
line diff
--- a/src/share/vm/asm/codeBuffer.cpp	Fri Jul 30 10:21:15 2010 -0700
+++ b/src/share/vm/asm/codeBuffer.cpp	Tue Aug 03 15:55:03 2010 -0700
@@ -128,7 +128,11 @@
   delete _overflow_arena;
 
 #ifdef ASSERT
+  // Save allocation type to execute assert in ~ResourceObj()
+  // which is called after this destructor.
+  ResourceObj::allocation_type at = _default_oop_recorder.get_allocation_type();
   Copy::fill_to_bytes(this, sizeof(*this), badResourceValue);
+  ResourceObj::set_allocation_type((address)(&_default_oop_recorder), at);
 #endif
 }