Skip to content

Commit 4cb22d4

Browse files
committed
[win/asan] GetInstructionSize: Support the instruction 0f 29 74 24 XX.
1 parent 266a1a8 commit 4cb22d4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,11 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
684684
return 3;
685685
}
686686

687+
switch (*(u32 *)address) {
688+
case 0x2474290f: // 0f 29 74 24 XX : movaps %xmm6, XX(%rsp)
689+
return 5;
690+
}
691+
687692
# if SANITIZER_WINDOWS_x64
688693
switch (*(u8*)address) {
689694
case 0xA1: // A1 XX XX XX XX XX XX XX XX :

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,7 @@ const struct InstructionSizeData {
867867
{ 3, {0xc2, 0x71, 0x72}, 0, "C2 XX XX : ret XX (needed for registering weak functions)"},
868868
{ 4, {0x8D, 0x4C, 0x24, 0x73}, 0, "8D 4C 24 XX : lea ecx, [esp + XX]"},
869869
{ 4, {0xFF, 0x74, 0x24, 0x73}, 0, "FF 74 24 XX : push qword ptr [rsp + XX]"},
870+
{ 5, {0x0f, 0x29, 0x74, 0x24, 0x74}, 0, "0f 29 74 24 XX : movaps %xmm6, XX(%rsp)"},
870871
{ 5, {0x68, 0x71, 0x72, 0x73, 0x74}, 0, "68 XX XX XX XX : push imm32"},
871872
{ 5, {0xb8, 0x71, 0x72, 0x73, 0x74}, 0, "b8 XX XX XX XX : mov eax, XX XX XX XX"},
872873
{ 5, {0xB9, 0x71, 0x72, 0x73, 0x74}, 0, "b9 XX XX XX XX : mov ecx, XX XX XX XX"},

0 commit comments

Comments
 (0)