Commit 69ebac7
authored
[win/asan] Don't intercept memset etc. in ntdll (#120397)
When ntdll was added to the list of of "interesting DLLs" list (in
d58230b), the intention was not to
intercept the "mini CRT" functions it exports. OverrideFunction would
only intercept the *first* function it found when searching the list of
DLLs, and ntdll was put last in that list.
However, after 42cdfbc,
OverrideFunction intercepts *all* matching functions in those DLLs. As
a side-effect, the runtime would now intercept functions like memset
etc. also in ntdll.
This causes a problem when ntdll-internal functions like
RtlDispatchException call the intercepted memset, which tries to
inspect uncommitted shadow memory, raising an exception, and getting
stuck in that loop until the stack overflows.
Since we never intended to intercept ntdll's memset etc., the simplest
fix seems to be to actively ignore ntdll when intercepting those
functions.
Fixes #1147931 parent e10cb44 commit 69ebac7
1 file changed
+28
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
216 | 228 | | |
217 | 229 | | |
218 | 230 | | |
| |||
1177 | 1189 | | |
1178 | 1190 | | |
1179 | 1191 | | |
1180 | | - | |
1181 | | - | |
| 1192 | + | |
1182 | 1193 | | |
1183 | 1194 | | |
1184 | 1195 | | |
| |||
1235 | 1246 | | |
1236 | 1247 | | |
1237 | 1248 | | |
1238 | | - | |
| 1249 | + | |
1239 | 1250 | | |
1240 | 1251 | | |
1241 | 1252 | | |
| |||
1281 | 1292 | | |
1282 | 1293 | | |
1283 | 1294 | | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1284 | 1299 | | |
1285 | 1300 | | |
1286 | 1301 | | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
1287 | 1311 | | |
1288 | 1312 | | |
1289 | 1313 | | |
| |||
1337 | 1361 | | |
1338 | 1362 | | |
1339 | 1363 | | |
1340 | | - | |
| 1364 | + | |
1341 | 1365 | | |
1342 | 1366 | | |
1343 | 1367 | | |
| |||
0 commit comments