8207345: AArch64: Trampoline generation code reads from unitialized memory
Reviewed-by: shade
This commit is contained in:
parent
da18d08006
commit
d326744b13
@ -739,11 +739,19 @@ address MacroAssembler::trampoline_call(Address entry, CodeBuffer *cbuf) {
|
|||||||
|| entry.rspec().type() == relocInfo::static_call_type
|
|| entry.rspec().type() == relocInfo::static_call_type
|
||||||
|| entry.rspec().type() == relocInfo::virtual_call_type, "wrong reloc type");
|
|| entry.rspec().type() == relocInfo::virtual_call_type, "wrong reloc type");
|
||||||
|
|
||||||
unsigned int start_offset = offset();
|
// We need a trampoline if branches are far.
|
||||||
if (far_branches() && !Compile::current()->in_scratch_emit_size()) {
|
if (far_branches()) {
|
||||||
address stub = emit_trampoline_stub(start_offset, entry.target());
|
// We don't want to emit a trampoline if C2 is generating dummy
|
||||||
if (stub == NULL) {
|
// code during its branch shortening phase.
|
||||||
return NULL; // CodeCache is full
|
CompileTask* task = ciEnv::current()->task();
|
||||||
|
bool in_scratch_emit_size =
|
||||||
|
(task != NULL && is_c2_compile(task->comp_level()) &&
|
||||||
|
Compile::current()->in_scratch_emit_size());
|
||||||
|
if (!in_scratch_emit_size) {
|
||||||
|
address stub = emit_trampoline_stub(offset(), entry.target());
|
||||||
|
if (stub == NULL) {
|
||||||
|
return NULL; // CodeCache is full
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user