mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
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:
parent
f0b6dc4e4f
commit
5bed80aab9
17 changed files with 128 additions and 43 deletions
|
@ -252,7 +252,7 @@ ciMethodBlocks::ciMethodBlocks(Arena *arena, ciMethod *meth): _method(meth),
|
|||
_arena(arena), _num_blocks(0), _code_size(meth->code_size()) {
|
||||
int block_estimate = _code_size / 8;
|
||||
|
||||
_blocks = new(_arena) GrowableArray<ciBlock *>(block_estimate);
|
||||
_blocks = new(_arena) GrowableArray<ciBlock *>(_arena, block_estimate, 0, NULL);
|
||||
int b2bsize = _code_size * sizeof(ciBlock **);
|
||||
_bci_to_block = (ciBlock **) arena->Amalloc(b2bsize);
|
||||
Copy::zero_to_words((HeapWord*) _bci_to_block, b2bsize / sizeof(HeapWord));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue