Open jerryc05 opened 4 years ago
@jerryc05 I ran into this and set the ulimit -v to unlimited to get past it.
I am seeing the same thing with a fresh install of clang/llvm 16 (16.0.6) from apt.llvm.org using bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
on a Raspberry Pi 3. Both ASAN and MSAN fail before the program is even run. Compiling and attempting to run the standard hello world C program gives:
$ clang-16 -fsanitize=address -o hello hello.c && ./hello
AddressSanitizer: CHECK failed: sanitizer_allocator_primary64.h:133 "((kSpaceBeg)) == ((address_range.Init(TotalSpaceSize, PrimaryAllocatorName, kSpaceBeg)))" (0x600000000000, 0xfffffffffffffff4) (tid=6629)
<empty stack>
$ clang-16 -fsanitize=memory -o hello hello.c && ./hello
MemorySanitizer: CHECK failed: sanitizer_allocator_primary64.h:133 "((kSpaceBeg)) == ((address_range.Init(TotalSpaceSize, PrimaryAllocatorName, kSpaceBeg)))" (0xe00000000000, 0xfffffffffffffff4) (tid=6633)
<empty stack>
$
The virtual memory is set to unlimited:
$ ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 2598
max locked memory (kbytes, -l) 116429
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 2598
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Same thing with clang 17.0.0 and 18.0.0.
$ clang-16 -fsanitize=memory -o hello hello.c && ./hello
MemorySanitizer: CHECK failed: sanitizer_allocator_primary64.h:133 "((kSpaceBeg)) == ((address_range.Init(TotalSpaceSize, PrimaryAllocatorName, kSpaceBeg)))" (0xe00000000000, 0xfffffffffffffff4) (tid=22663)
<empty stack>
$ clang-17 -fsanitize=memory -o hello hello.c && ./hello
MemorySanitizer: CHECK failed: sanitizer_allocator_primary64.h:133 "((kSpaceBeg)) == ((address_range.Init(TotalSpaceSize, PrimaryAllocatorName, kSpaceBeg)))" (0xe00000000000, 0xfffffffffffffff4) (tid=22668)
<empty stack>
$ clang-18 -fsanitize=memory -o hello hello.c && ./hello
MemorySanitizer: CHECK failed: sanitizer_allocator_primary64.h:133 "((kSpaceBeg)) == ((address_range.Init(TotalSpaceSize, PrimaryAllocatorName, kSpaceBeg)))" (0xe00000000000, 0xfffffffffffffff4) (tid=22672)
<empty stack>
Still same issue in 19.1.1 unfortunately - testing on ARM64 with 48bit VA size.
I got this error when I was running on a remote Fedora Linux machine via ssh:
This is similar to #1243, but I was using the regular asan, not hwasan.
Note that I only encountered this error on this particular remote machine. ASAN worked very well on my local machines. Any clue?