Skip to content

Commit 7bb4352

Browse files
committed
x86: Fix post-call NOP check access outside code blob
Change-Id: I5f5fd681ba699f96859180d984841dd6df8524b5
1 parent 359c2f1 commit 7bb4352

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/hotspot/cpu/x86/c1_LIRAssembler_x86.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
enum {
4949
_call_stub_size = 28,
5050
_exception_handler_size = DEBUG_ONLY(1*K) NOT_DEBUG(175),
51-
_deopt_handler_size = 10
51+
_deopt_handler_size = 7
5252
};
5353

5454
public:

src/hotspot/cpu/x86/nativeInst_x86.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class NativeInstruction {
7373
s_char sbyte_at(int offset) const { return *(s_char*) addr_at(offset); }
7474
u_char ubyte_at(int offset) const { return *(u_char*) addr_at(offset); }
7575

76+
jshort short_at(int offset) const { return *(jshort*) addr_at(offset); }
7677
jint int_at(int offset) const { return *(jint*) addr_at(offset); }
7778

7879
intptr_t ptr_at(int offset) const { return *(intptr_t*) addr_at(offset); }
@@ -581,7 +582,7 @@ class NativePostCallNop: public NativeInstruction {
581582
displacement_offset = 4
582583
};
583584

584-
bool check() const { return int_at(0) == 0x841f0f; }
585+
bool check() const { return short_at(0) == 0x1f0f && short_at(2) == 0x0084; }
585586
bool decode(int32_t& oopmap_slot, int32_t& cb_offset) const {
586587
int32_t data = int_at(displacement_offset);
587588
if (data == 0) {

src/hotspot/cpu/x86/x86.ad

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2771,7 +2771,7 @@ class HandlerImpl {
27712771

27722772
static uint size_deopt_handler() {
27732773
// one call and one jmp.
2774-
return 10;
2774+
return 7;
27752775
}
27762776
};
27772777

0 commit comments

Comments
 (0)