Skip to content

Commit 9a9e41c

Browse files
authored
[win/asan] GetInstructionSize: Add test for 8D A4 24 .... (#119794)
This adds a test line and updates a comment.
1 parent ab9a80a commit 9a9e41c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler-rt/lib/interception/tests/interception_win_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,8 @@ const struct InstructionSizeData {
801801
size_t size; // hold instruction size or 0 for failure,
802802
// e.g. on control instructions
803803
u8 instr[16];
804-
size_t rel_offset; // filled just for instructions with two operands
805-
// and displacement length of four bytes.
804+
size_t rel_offset; // adjustment for RIP-relative addresses when copying
805+
// instructions during hooking via hotpatch or trampoline.
806806
const char *comment;
807807
} data[] = {
808808
// clang-format off
@@ -858,6 +858,7 @@ const struct InstructionSizeData {
858858
{ 5, {0x68, 0x71, 0x72, 0x73, 0x74}, 0, "68 XX XX XX XX : push imm32"},
859859
{ 5, {0xb8, 0x71, 0x72, 0x73, 0x74}, 0, "b8 XX XX XX XX : mov eax, XX XX XX XX"},
860860
{ 5, {0xB9, 0x71, 0x72, 0x73, 0x74}, 0, "b9 XX XX XX XX : mov ecx, XX XX XX XX"},
861+
{ 7, {0x8D, 0xA4, 0x24, 0x73, 0x74, 0x75, 0x76}, 0, "8D A4 24 XX XX XX XX : lea esp, [esp + XX XX XX XX]"},
861862
#if SANITIZER_WINDOWS_x64
862863
// sorted list
863864
{ 2, {0x40, 0x50}, 0, "40 50 : push rax"},

0 commit comments

Comments
 (0)