[compiler-rt] [win/asan] GetInstructionSize: Support the instruction `0f 29 74 24 XX`. (PR #152361)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 11:31:07 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: None (bernhardu)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/152361.diff
2 Files Affected:
- (modified) compiler-rt/lib/interception/interception_win.cpp (+5)
- (modified) compiler-rt/lib/interception/tests/interception_win_test.cpp (+1)
``````````diff
diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index 246a22c56c31a..5402f8368a409 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -684,6 +684,11 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
return 3;
}
+ switch (*(u32 *)address) {
+ case 0x2474290f : // 0f 29 74 24 XX : movaps %xmm6, XX(%rsp)
+ return 5;
+ }
+
# if SANITIZER_WINDOWS_x64
switch (*(u8*)address) {
case 0xA1: // A1 XX XX XX XX XX XX XX XX :
diff --git a/compiler-rt/lib/interception/tests/interception_win_test.cpp b/compiler-rt/lib/interception/tests/interception_win_test.cpp
index f11c1d1458556..ef1e94d02b793 100644
--- a/compiler-rt/lib/interception/tests/interception_win_test.cpp
+++ b/compiler-rt/lib/interception/tests/interception_win_test.cpp
@@ -867,6 +867,7 @@ const struct InstructionSizeData {
{ 3, {0xc2, 0x71, 0x72}, 0, "C2 XX XX : ret XX (needed for registering weak functions)"},
{ 4, {0x8D, 0x4C, 0x24, 0x73}, 0, "8D 4C 24 XX : lea ecx, [esp + XX]"},
{ 4, {0xFF, 0x74, 0x24, 0x73}, 0, "FF 74 24 XX : push qword ptr [rsp + XX]"},
+ { 5, {0x0f, 0x29, 0x74, 0x24, 0x74}, 0, "0f 29 74 24 XX : movaps %xmm6, XX(%rsp)"},
{ 5, {0x68, 0x71, 0x72, 0x73, 0x74}, 0, "68 XX XX XX XX : push imm32"},
{ 5, {0xb8, 0x71, 0x72, 0x73, 0x74}, 0, "b8 XX XX XX XX : mov eax, XX XX XX XX"},
{ 5, {0xB9, 0x71, 0x72, 0x73, 0x74}, 0, "b9 XX XX XX XX : mov ecx, XX XX XX XX"},
``````````
</details>
https://github.com/llvm/llvm-project/pull/152361
More information about the llvm-commits
mailing list