6973963: SEGV in ciBlock::start_bci() with EA

Added more checks into ResourceObj and growableArray to verify correctness of allocation type.

Reviewed-by: never, coleenp, dholmes
This commit is contained in:
Vladimir Kozlov 2010-08-03 15:55:03 -07:00
parent f0b6dc4e4f
commit 5bed80aab9
17 changed files with 128 additions and 43 deletions

View file

@ -128,7 +128,11 @@ CodeBuffer::~CodeBuffer() {
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
}