-
Bug
-
Resolution: Unresolved
-
P3
-
11, 17, 19, 20
-
x86
When we emit static call stubs via C1, we carefully align the instructions of the static call stub in the following way:
__ align(BytesPerWord, __ offset() + NativeMovConstReg::instruction_size + NativeCall::displacement_offset);
__ relocate(static_stub_Relocation::spec(call_pc));
__ mov_metadata(rbx, (Metadata*)NULL);
// must be set to -1 at code generation time
assert(((__ offset() + 1) % BytesPerWord) == 0, "must be aligned");
// On 64bit this will die since it will take a movq & jmp, must be only a jmp
__ jump(RuntimeAddress(__ pc()));
However, when we emit the static call stubs from C2, we go through a different path in CompiledStaticCall::emit_to_interp_stub, where the instructions are not explicitly aligned in the same way.
It would appear that the C2 static call stubs are not aligned appropriately, which might lead to strange behaviour when it is concurrently updated with cross modifying code, partially during resolution, and partially through concurrent class unloading.
__ align(BytesPerWord, __ offset() + NativeMovConstReg::instruction_size + NativeCall::displacement_offset);
__ relocate(static_stub_Relocation::spec(call_pc));
__ mov_metadata(rbx, (Metadata*)NULL);
// must be set to -1 at code generation time
assert(((__ offset() + 1) % BytesPerWord) == 0, "must be aligned");
// On 64bit this will die since it will take a movq & jmp, must be only a jmp
__ jump(RuntimeAddress(__ pc()));
However, when we emit the static call stubs from C2, we go through a different path in CompiledStaticCall::emit_to_interp_stub, where the instructions are not explicitly aligned in the same way.
It would appear that the C2 static call stubs are not aligned appropriately, which might lead to strange behaviour when it is concurrently updated with cross modifying code, partially during resolution, and partially through concurrent class unloading.
- relates to
-
JDK-8296440 Remove Method* handling from cleanup_inline_caches_impl
- In Progress
-
JDK-8294947 Use 64bit atomics in patch_verified_entry on x86_64
- Resolved
-
JDK-8295097 DirectNativeCallWrapper::verify_resolve_call fails with "assert(db != __null && !db->is_adapter_blob()) failed: must use stub!"
- Closed