Mercurial > hg > openjdk > jdk9 > hotspot
changeset 12791:79b6a9bd5c3b
8181906: AArch64: port bugfix for 7009641 to AArch64
Summary: Allocation in the code cache returns NULL instead of failing the entire VM
Reviewed-by: aph
Contributed-by: teng.lu@linaro.org
author | fyang |
---|---|
date | Sat, 10 Jun 2017 16:01:29 +0800 |
parents | 944791f81601 |
children | 29467418d0ca |
files | src/cpu/aarch64/vm/vtableStubs_aarch64.cpp |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp Thu Jun 08 23:11:00 2017 +0000 +++ b/src/cpu/aarch64/vm/vtableStubs_aarch64.cpp Sat Jun 10 16:01:29 2017 +0800 @@ -51,6 +51,11 @@ VtableStub* VtableStubs::create_vtable_stub(int vtable_index) { const int aarch64_code_length = VtableStub::pd_code_size_limit(true); VtableStub* s = new(aarch64_code_length) VtableStub(true, vtable_index); + // Can be NULL if there is no free space in the code cache. + if (s == NULL) { + return NULL; + } + ResourceMark rm; CodeBuffer cb(s->entry_point(), aarch64_code_length); MacroAssembler* masm = new MacroAssembler(&cb);