8200290: Scratch buffer creation fails with "assert(!current_thread_in_native()) failed: must not be in native" on SPARC
The code needs to be changed after JDK-8167372 to transition from native. Reviewed-by: kvn
This commit is contained in:
parent
b22a2dd78a
commit
642b68b31b
@ -998,8 +998,13 @@ AddressLiteral MacroAssembler::constant_metadata_address(Metadata* obj) {
|
|||||||
|
|
||||||
|
|
||||||
AddressLiteral MacroAssembler::constant_oop_address(jobject obj) {
|
AddressLiteral MacroAssembler::constant_oop_address(jobject obj) {
|
||||||
|
#ifdef ASSERT
|
||||||
|
{
|
||||||
|
ThreadInVMfromUnknown tiv;
|
||||||
assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
|
assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
|
||||||
assert(Universe::heap()->is_in_reserved(JNIHandles::resolve(obj)), "not an oop");
|
assert(Universe::heap()->is_in_reserved(JNIHandles::resolve(obj)), "not an oop");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
int oop_index = oop_recorder()->find_index(obj);
|
int oop_index = oop_recorder()->find_index(obj);
|
||||||
return AddressLiteral(obj, oop_Relocation::spec(oop_index));
|
return AddressLiteral(obj, oop_Relocation::spec(oop_index));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user