Skip to content

Commit a20794b

Browse files
authored
[Sanitizer] Call Die() instead of Abort() when failed to reserve shadow memory range (#107833)
I grep the code and find that `Abort()` is only called in `Die()` when the flag `abort_on_error` is set. Thus, if reserving shadow memory range fails, `Die()` rather than `Abort()` should be called. In this case, the flag `abort_on_error` will be respected and the die callbacks will be called.
1 parent 7b3d4e3 commit a20794b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name,
171171
"ReserveShadowMemoryRange failed while trying to map 0x%zx bytes. "
172172
"Perhaps you're using ulimit -v or ulimit -d\n",
173173
size);
174-
Abort();
174+
Die();
175175
}
176176
if (madvise_shadow && common_flags()->use_madv_dontdump)
177177
DontDumpShadowMemory(beg, size);

0 commit comments

Comments
 (0)