Skip to content

Commit 7a36713

Browse files
committed
Bug 1923321 - Apply compiler-rt patches for ASan interception on Windows 11 24H2. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D226404 UltraBlame original commit: edffabee1b8d1b045d2f9bca0d072648fe810505
1 parent 490a811 commit 7a36713

File tree

4 files changed

+688
-0
lines changed

4 files changed

+688
-0
lines changed

build/build-clang/compiler-rt-18.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"
3+
patches
4+
"
5+
:
6+
[
7+
"
8+
llvmorg
9+
-
10+
20
11+
-
12+
init
13+
-
14+
9466
15+
-
16+
gce4618a9c405
17+
.
18+
patch
19+
"
20+
"
21+
llvmorg
22+
-
23+
20
24+
-
25+
init
26+
-
27+
9666
28+
-
29+
g8417f6af54c8
30+
.
31+
patch
32+
"
33+
]
34+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,340 @@
1+
From
2+
ce4618a9c405bd8a9c1e096eb45e9ca83d3891f1
3+
Mon
4+
Sep
5+
17
6+
00
7+
:
8+
00
9+
:
10+
00
11+
2001
12+
From
13+
:
14+
Mike
15+
Hommey
16+
<
17+
mh
18+
glandium
19+
.
20+
org
21+
>
22+
Date
23+
:
24+
Fri
25+
18
26+
Oct
27+
2024
28+
21
29+
:
30+
42
31+
:
32+
03
33+
+
34+
0900
35+
Subject
36+
:
37+
[
38+
PATCH
39+
]
40+
[
41+
ASan
42+
]
43+
[
44+
windows
45+
]
46+
Recognize
47+
movzx
48+
r11d
49+
BYTE
50+
PTR
51+
[
52+
rdx
53+
]
54+
in
55+
interception_win
56+
(
57+
#
58+
111638
59+
)
60+
The
61+
instruction
62+
is
63+
present
64+
in
65+
some
66+
library
67+
in
68+
the
69+
24H2
70+
update
71+
for
72+
Windows
73+
11
74+
:
75+
=
76+
=
77+
8508
78+
=
79+
=
80+
interception_win
81+
:
82+
unhandled
83+
instruction
84+
at
85+
0x7ff83e193a40
86+
:
87+
44
88+
0f
89+
b6
90+
1a
91+
4c
92+
8b
93+
d2
94+
48
95+
This
96+
could
97+
be
98+
generalized
99+
but
100+
getting
101+
all
102+
the
103+
ModR
104+
/
105+
M
106+
byte
107+
combinations
108+
right
109+
is
110+
tricky
111+
.
112+
Many
113+
other
114+
classes
115+
of
116+
instructions
117+
handled
118+
in
119+
this
120+
file
121+
could
122+
use
123+
some
124+
generalization
125+
too
126+
.
127+
-
128+
-
129+
-
130+
compiler
131+
-
132+
rt
133+
/
134+
lib
135+
/
136+
interception
137+
/
138+
interception_win
139+
.
140+
cpp
141+
|
142+
1
143+
+
144+
1
145+
file
146+
changed
147+
1
148+
insertion
149+
(
150+
+
151+
)
152+
diff
153+
-
154+
-
155+
git
156+
a
157+
/
158+
compiler
159+
-
160+
rt
161+
/
162+
lib
163+
/
164+
interception
165+
/
166+
interception_win
167+
.
168+
cpp
169+
b
170+
/
171+
compiler
172+
-
173+
rt
174+
/
175+
lib
176+
/
177+
interception
178+
/
179+
interception_win
180+
.
181+
cpp
182+
index
183+
4a6ff6656edb
184+
.
185+
.
186+
4f60d4251303
187+
100644
188+
-
189+
-
190+
-
191+
a
192+
/
193+
compiler
194+
-
195+
rt
196+
/
197+
lib
198+
/
199+
interception
200+
/
201+
interception_win
202+
.
203+
cpp
204+
+
205+
+
206+
+
207+
b
208+
/
209+
compiler
210+
-
211+
rt
212+
/
213+
lib
214+
/
215+
interception
216+
/
217+
interception_win
218+
.
219+
cpp
220+
-
221+
768
222+
6
223+
+
224+
768
225+
7
226+
static
227+
size_t
228+
GetInstructionSize
229+
(
230+
uptr
231+
address
232+
size_t
233+
*
234+
rel_offset
235+
=
236+
nullptr
237+
)
238+
{
239+
}
240+
switch
241+
(
242+
*
243+
(
244+
u32
245+
*
246+
)
247+
(
248+
address
249+
)
250+
)
251+
{
252+
+
253+
case
254+
0x1ab60f44
255+
:
256+
/
257+
/
258+
44
259+
0f
260+
b6
261+
1a
262+
:
263+
movzx
264+
r11d
265+
BYTE
266+
PTR
267+
[
268+
rdx
269+
]
270+
case
271+
0x24448b48
272+
:
273+
/
274+
/
275+
48
276+
8b
277+
44
278+
24
279+
XX
280+
:
281+
mov
282+
rax
283+
QWORD
284+
ptr
285+
[
286+
rsp
287+
+
288+
XX
289+
]
290+
case
291+
0x246c8948
292+
:
293+
/
294+
/
295+
48
296+
89
297+
6C
298+
24
299+
XX
300+
:
301+
mov
302+
QWORD
303+
ptr
304+
[
305+
rsp
306+
+
307+
XX
308+
]
309+
rbp
310+
case
311+
0x245c8948
312+
:
313+
/
314+
/
315+
48
316+
89
317+
5c
318+
24
319+
XX
320+
:
321+
mov
322+
QWORD
323+
PTR
324+
[
325+
rsp
326+
+
327+
XX
328+
]
329+
rbx
330+
-
331+
-
332+
2
333+
.
334+
47
335+
.
336+
0
337+
.
338+
1
339+
.
340+
g59ce1bf855

0 commit comments

Comments
 (0)