Backed out changeset 5669c20b0617 (bug 1903669) for causing crashtest failures on...
[gecko.git] / build / build-clang / llvmorg-18-init-8471-g160e8eb44961.patch
blobfcd170919c91094da6a546d9060e640d82d778d5
1 From 160e8eb4496104a1d0ed77649af7e8bb679252f9 Mon Sep 17 00:00:00 2001
2 From: nicole mazzuca <nicole@strega-nil.co>
3 Date: Fri, 13 Oct 2023 08:47:23 -0700
4 Subject: [PATCH] [ASan] Recognize lea r10, [rip + XX] (#68910)
6 This instruction is present in memcpy in the latest vcruntime
8 This PR has been opened for @AndrewDeanMS (a teammate inside Microsoft)
9 who made the PR to our internal branch.
11 Co-authored-by: Andrew Dean <Andrew.Dean@microsoft.com>
12 ---
13 compiler-rt/lib/interception/interception_win.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
16 diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
17 index d57afa3fda7b..1b681ada37b1 100644
18 --- a/compiler-rt/lib/interception/interception_win.cpp
19 +++ b/compiler-rt/lib/interception/interception_win.cpp
20 @@ -624,7 +624,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
21 // mov rax, QWORD PTR [rip + XXXXXXXX]
22 case 0x25ff48: // 48 ff 25 XX XX XX XX :
23 // rex.W jmp QWORD PTR [rip + XXXXXXXX]
25 + case 0x158D4C: // 4c 8d 15 XX XX XX XX : lea r10, [rip + XX]
26 // Instructions having offset relative to 'rip' need offset adjustment.
27 if (rel_offset)
28 *rel_offset = 3;
29 --
30 2.44.0.1.g9765aa7075