Mercurial > hg > graal-jvmci-8
comparison src/share/vm/ci/ciInstanceKlass.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 | 3941674cc7fa |
children | d55217dc206f |
comparison
equal
deleted
inserted
replaced
1684:66c5dadb4d61 | 1685:0e35fa8ebccd |
---|---|
401 VM_ENTRY_MARK; | 401 VM_ENTRY_MARK; |
402 ciEnv* curEnv = ciEnv::current(); | 402 ciEnv* curEnv = ciEnv::current(); |
403 instanceKlass* ik = get_instanceKlass(); | 403 instanceKlass* ik = get_instanceKlass(); |
404 int max_n_fields = ik->fields()->length()/instanceKlass::next_offset; | 404 int max_n_fields = ik->fields()->length()/instanceKlass::next_offset; |
405 | 405 |
406 Arena* arena = curEnv->arena(); | |
406 _non_static_fields = | 407 _non_static_fields = |
407 new (curEnv->arena()) GrowableArray<ciField*>(max_n_fields); | 408 new (arena) GrowableArray<ciField*>(arena, max_n_fields, 0, NULL); |
408 NonStaticFieldFiller filler(curEnv, _non_static_fields); | 409 NonStaticFieldFiller filler(curEnv, _non_static_fields); |
409 ik->do_nonstatic_fields(&filler); | 410 ik->do_nonstatic_fields(&filler); |
410 } | 411 } |
411 return _non_static_fields; | 412 return _non_static_fields; |
412 } | 413 } |