Skip to content

Commit

Permalink
[sanitizer] Suggest checking ulimit -d in addition to ulimit -v (#98625)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
iii-i authored Jul 13, 2024
1 parent 69fecaa commit 7232763
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void ReserveShadowMemoryRange(uptr beg, uptr end, const char *name,
: !MmapFixedNoReserve(beg, size, name)) {
Report(
"ReserveShadowMemoryRange failed while trying to map 0x%zx bytes. "
"Perhaps you're using ulimit -v\n",
"Perhaps you're using ulimit -v or ulimit -d\n",
size);
Abort();
}
Expand Down

0 comments on commit 7232763

Please sign in to comment.