--- old/src/share/vm/asm/codeBuffer.cpp Tue Aug 3 11:01:39 2010 +++ new/src/share/vm/asm/codeBuffer.cpp Tue Aug 3 11:01:39 2010 @@ -128,8 +128,12 @@ 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); -#endif + ResourceObj::set_allocation_type((address)(&_default_oop_recorder), at); +#endif } void CodeBuffer::initialize_oop_recorder(OopRecorder* r) {