Skip to content

Commit 7232763

Browse files
authored
[sanitizer] Suggest checking ulimit -d in addition to ulimit -v (#98625)
Since Linux 4.7, RLIMIT_DATA may result in mmap() returning ENOMEM. Example: $ clang -fsanitize=address -o hello hello.c $ ulimit -d 100000 $ ./hello ==3349007==ERROR: AddressSanitizer failed to allocate 0x10000000 (268435456) bytes at address 7fff7000 (errno: 12) ==3349007==ReserveShadowMemoryRange failed while trying to map 0x10000000 bytes. Perhaps you're using ulimit -v Suggest checking ulimit -d in addition to ulimit -v.
1 parent 69fecaa commit 7232763

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
@@ -169,7 +169,7 @@ void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name,
169169
: !MmapFixedNoReserve(beg, size, name)) {
170170
Report(
171171
"ReserveShadowMemoryRange failed while trying to map 0x%zx bytes. "
172-
"Perhaps you're using ulimit -v\n",
172+
"Perhaps you're using ulimit -v or ulimit -d\n",
173173
size);
174174
Abort();
175175
}

0 commit comments

Comments
 (0)