hotspot/src/share/vm/asm/codeBuffer.cpp
changeset 6180 53c1bf468c81
parent 5883 8dc4bdc132d5
child 6418 6671edbd230e
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Fri Jul 30 10:21:15 2010 -0700
+++ b/hotspot/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
 }