Mercurial > hg > graal-jvmci-8
comparison 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 |
comparison
equal
deleted
inserted
replaced
1684:66c5dadb4d61 | 1685:0e35fa8ebccd |
---|---|
126 | 126 |
127 // free any overflow storage | 127 // free any overflow storage |
128 delete _overflow_arena; | 128 delete _overflow_arena; |
129 | 129 |
130 #ifdef ASSERT | 130 #ifdef ASSERT |
131 // Save allocation type to execute assert in ~ResourceObj() | |
132 // which is called after this destructor. | |
133 ResourceObj::allocation_type at = _default_oop_recorder.get_allocation_type(); | |
131 Copy::fill_to_bytes(this, sizeof(*this), badResourceValue); | 134 Copy::fill_to_bytes(this, sizeof(*this), badResourceValue); |
135 ResourceObj::set_allocation_type((address)(&_default_oop_recorder), at); | |
132 #endif | 136 #endif |
133 } | 137 } |
134 | 138 |
135 void CodeBuffer::initialize_oop_recorder(OopRecorder* r) { | 139 void CodeBuffer::initialize_oop_recorder(OopRecorder* r) { |
136 assert(_oop_recorder == &_default_oop_recorder && _default_oop_recorder.is_unused(), "do this once"); | 140 assert(_oop_recorder == &_default_oop_recorder && _default_oop_recorder.is_unused(), "do this once"); |