csmith-project / csmith

Csmith, a random generator of C programs
http://embed.cs.utah.edu/csmith/
Other
1.01k stars 144 forks source link

MemorySanitizer: SEGV on unknown address 0x000000000000 address points to the zero page when Seed=1688874051305641 #118

Open yansendao opened 3 years ago

yansendao commented 3 years ago
$ clang++ -fsanitize=memory -O0 -w -Wno-c++11-narrowing -I /home/yansendao/software/csmith/include test.cpp -g && ./a.out
MemorySanitizer:DEADLYSIGNAL
==57561==ERROR: MemorySanitizer: SEGV on unknown address 0x000000000000 (pc 0xaaaaac35d224 bp 0xffffec802160 sp 0xffffec7ffaf0 T57561)
==57561==The signal is caused by a READ memory access.
==57561==Hint: address points to the zero page.
    #0 0xaaaaac35d224 in func_1() /home/yansendao/history/csmith/workdir-gcc-9.3.1_clang-10.0.1-csmith-20210218-195056/dir-35229/test.cpp:338:368
    #1 0xaaaaac3563b8 in main /home/yansendao/history/csmith/workdir-gcc-9.3.1_clang-10.0.1-csmith-20210218-195056/dir-35229/test.cpp:1979:5
    #2 0xffffb42aa71c in __libc_start_main /build/glibc-D9JkfM/glibc-2.27/csu/../csu/libc-start.c:310
    #3 0xaaaaac2e2290 in _start (/home/yansendao/history/csmith/workdir-gcc-9.3.1_clang-10.0.1-csmith-20210218-195056/dir-35229/a.out+0x2b290)

MemorySanitizer can not provide additional info.
SUMMARY: MemorySanitizer: SEGV /home/yansendao/history/csmith/workdir-gcc-9.3.1_clang-10.0.1-csmith-20210218-195056/dir-35229/test.cpp:338:368 in func_1()
==57561==ABORTING
$ csmith -v
csmith 2.4.0
Git version: 0f93464

csmith --lang-cpp --cpp11

test.zip

jxyang commented 3 years ago

Confirmed. Thanks for reporting.