https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108005
Bug ID: 108005
Summary: FAIL: c-c++-common/asan/null-deref-1.c
/pointer-compare-1.c output pattern test
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: zhangkefan at ultrarisc dot com
Target Milestone: ---
##When I make check-gcc RUNTESTFLAGS=asan.exp
FAIL: c-c++-common/asan/null-deref-1.c -O0 output pattern test
FAIL: c-c++-common/asan/null-deref-1.c -O1 output pattern test
FAIL: c-c++-common/asan/null-deref-1.c -O2 output pattern test
FAIL: c-c++-common/asan/null-deref-1.c -O3 -g output pattern test
FAIL: c-c++-common/asan/null-deref-1.c -Os output pattern test
FAIL: c-c++-common/asan/null-deref-1.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none output pattern test
FAIL: c-c++-common/asan/null-deref-1.c -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c -O1 output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c -O2 output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c -O3 -g output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c -Os output pattern test
##all of them are output pattern error and I run this on riscv
Output was:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==3347640==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000028 (pc
0x000000010764 bp 0x003fffeff610 sp 0x003fffeff5f0 T0)
==3347640==The signal is caused by a READ memory access.
==3347640==Hint: address points to the zero page.
#0 0x10764 in NullDeref c-c++-common/asan/null-deref-1.c:10
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV c-c++-common/asan/null-deref-1.c:10 in
NullDeref
==3347640==ABORTING
Should match:
ERROR: AddressSanitizer:? SEGV on unknown address[^
^M]*0x[0-9a-f]+ [^
^M]*pc 0x[0-9a-f]+.*(
|^M
|^M) #0 0x[0-9a-f]+ +(in [^
^M]*NullDeref[^
^M]* ([^
^M]*null-deref-1.c:10|[^
^M]*:0|[^
^M]*\+0x[0-9a-z]*)|[(])[^
^M]*(
|^M
|^M) #1 0x[0-9a-f]+ +(in _*main ([^
^M]*null-deref-1.c:15|[^
^M]*:0|[^
^M]*\+0x[0-9a-z]*)|[(])
`````````