diff src/share/vm/asm/codeBuffer.cpp @ 2015:79d8657be916

6993125: runThese crashes with assert(Thread::current()->on_local_stack((address)this)) Summary: add another ResourceObj debug field to distinguish garbage Reviewed-by: dholmes, coleenp
author kvn
date Fri, 10 Dec 2010 14:14:02 -0800
parents f95d63e2154a
children 06f017f7daa7 754110e02bd5
line wrap: on
line diff
--- a/src/share/vm/asm/codeBuffer.cpp	Wed Dec 08 17:50:49 2010 -0800
+++ b/src/share/vm/asm/codeBuffer.cpp	Fri Dec 10 14:14:02 2010 -0800
@@ -131,6 +131,7 @@
 #ifdef ASSERT
   // Save allocation type to execute assert in ~ResourceObj()
   // which is called after this destructor.
+  assert(_default_oop_recorder.allocated_on_stack(), "should be embedded object");
   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);