Describe the bug Specify the sanitizer compilation option as address, failed to specify when testing logging.tcl To reproduce 1. make SANITIZER=address 2. ./runtest --single integration/logging 3. The output is as follows
./runtest --single integration/logging
Cleanup: may take some time... OK
Starting test server at port 21079
[ready]: 49264
Testing integration/logging
[ready]: 49265
[ready]: 49266
[ready]: 49267
[ready]: 49268
[ready]: 49269
[ready]: 49270
[ready]: 49271
[ready]: 49273
[ready]: 49272
[ready]: 49275
[ready]: 49276
[ready]: 49274
[ready]: 49277
[ready]: 49278
[ready]: 49279
[ok]: Server is able to generate a stack trace on selected systems
[ok]: Crash report generated on SIGABRT
[err]: Sanitizer error: =================================================================
==49320==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000794004 at pc 0x7f170605a50e bp 0x7fffb6334240 sp 0x7fffb63339f0
READ of size 122880 at 0x000000794004 thread T0
#0 0x7f170605a50d (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
#1 0x5891bb in memtest_preserving_test /home/work/github/redis/src/memtest.c:317
#2 0x545301 in memtest_test_linux_anonymous_maps /home/work/github/redis/src/debug.c:1798
#3 0x545522 in doFastMemoryTest /home/work/github/redis/src/debug.c:1839
#4 0x54c27f in sigsegvHandler /home/work/github/redis/src/debug.c:1936
#5 0x7f1705ef2f9f (/opt/compiler/gcc-8.2/lib/libpthread.so.0+0x10f9f)
#6 0x7f1705e28932 in __GI_epoll_wait (/opt/compiler/gcc-8.2/lib/libc.so.6+0xeb932)
#7 0x43f48c in aeApiPoll /home/work/github/redis/src/ae_epoll.c:113
#8 0x43f48c in aeProcessEvents /home/work/github/redis/src/ae.c:396
#9 0x44016c in aeMain /home/work/github/redis/src/ae.c:488
#10 0x433a86 in main /home/work/github/redis/src/server.c:8094
#11 0x7f1705d5eb8d in __libc_start_main /home/liruihao/mygcc82/glibc-2.21/csu/libc-start.c:289
#12 0x434d68 in _start (/home/work/github/redis/src/redis-server+0x434d68)
0x000000794004 is located 60 bytes to the left of global variable 'newline_sent' defined in 'replication.c:1617:19' (0x794040) of size 8
0x000000794004 is located 0 bytes to the right of global variable 'usemark' defined in 'replication.c:1753:16' (0x794000) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
Shadow bytes around the buggy address:
0x0000800ea7b0: 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7c0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
0x0000800ea7d0: 00 00 00 00 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7e0: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea7f0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
=>0x0000800ea800:[04]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
0x0000800ea810: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x0000800ea820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800ea830: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9
0x0000800ea840: 04 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea850: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==49320==ABORTING
[ok]: Crash report generated on DEBUG SEGFAULT
[err]: Sanitizer error: =================================================================
==49373==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000794004 at pc 0x7fd9bf1b050e bp 0x7fff5971b700 sp 0x7fff5971aeb0
READ of size 122880 at 0x000000794004 thread T0
#0 0x7fd9bf1b050d (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
#1 0x5891bb in memtest_preserving_test /home/work/github/redis/src/memtest.c:317
#2 0x545301 in memtest_test_linux_anonymous_maps /home/work/github/redis/src/debug.c:1798
#3 0x545522 in doFastMemoryTest /home/work/github/redis/src/debug.c:1839
#4 0x54c27f in sigsegvHandler /home/work/github/redis/src/debug.c:1936
#5 0x7fd9bf048f9f (/opt/compiler/gcc-8.2/lib/libpthread.so.0+0x10f9f)
#6 0x54865e in debugCommand /home/work/github/redis/src/debug.c:493
#7 0x452206 in call /home/work/github/redis/src/server.c:4908
#8 0x455750 in processCommand /home/work/github/redis/src/server.c:5486
#9 0x49267b in processCommandAndResetClient /home/work/github/redis/src/networking.c:2147
#10 0x49a7c5 in processInputBuffer /home/work/github/redis/src/networking.c:2242
#11 0x4a1faf in readQueryFromClient /home/work/github/redis/src/networking.c:2354
#12 0x6404b6 in callHandler /home/work/github/redis/src/connhelpers.h:79
#13 0x6404b6 in connSocketEventHandler /home/work/github/redis/src/connection.c:295
#14 0x43f6eb in aeProcessEvents /home/work/github/redis/src/ae.c:428
#15 0x44016c in aeMain /home/work/github/redis/src/ae.c:488
#16 0x433a86 in main /home/work/github/redis/src/server.c:8094
#17 0x7fd9beeb4b8d in __libc_start_main /home/liruihao/mygcc82/glibc-2.21/csu/libc-start.c:289
#18 0x434d68 in _start (/home/work/github/redis/src/redis-server+0x434d68)
0x000000794004 is located 60 bytes to the left of global variable 'newline_sent' defined in 'replication.c:1617:19' (0x794040) of size 8
0x000000794004 is located 0 bytes to the right of global variable 'usemark' defined in 'replication.c:1753:16' (0x794000) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
Shadow bytes around the buggy address:
0x0000800ea7b0: 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7c0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
0x0000800ea7d0: 00 00 00 00 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7e0: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea7f0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
=>0x0000800ea800:[04]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
0x0000800ea810: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x0000800ea820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800ea830: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9
0x0000800ea840: 04 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea850: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==49373==ABORTING
[1/1 done]: integration/logging (1 seconds)
The End
Execution time of different units:
1 seconds - integration/logging
!!! WARNING The following tests failed:
*** [err]: Sanitizer error: =================================================================
==49320==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000794004 at pc 0x7f170605a50e bp 0x7fffb6334240 sp 0x7fffb63339f0
READ of size 122880 at 0x000000794004 thread T0
#0 0x7f170605a50d (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
#1 0x5891bb in memtest_preserving_test /home/work/github/redis/src/memtest.c:317
#2 0x545301 in memtest_test_linux_anonymous_maps /home/work/github/redis/src/debug.c:1798
#3 0x545522 in doFastMemoryTest /home/work/github/redis/src/debug.c:1839
#4 0x54c27f in sigsegvHandler /home/work/github/redis/src/debug.c:1936
#5 0x7f1705ef2f9f (/opt/compiler/gcc-8.2/lib/libpthread.so.0+0x10f9f)
#6 0x7f1705e28932 in __GI_epoll_wait (/opt/compiler/gcc-8.2/lib/libc.so.6+0xeb932)
#7 0x43f48c in aeApiPoll /home/work/github/redis/src/ae_epoll.c:113
#8 0x43f48c in aeProcessEvents /home/work/github/redis/src/ae.c:396
#9 0x44016c in aeMain /home/work/github/redis/src/ae.c:488
#10 0x433a86 in main /home/work/github/redis/src/server.c:8094
#11 0x7f1705d5eb8d in __libc_start_main /home/liruihao/mygcc82/glibc-2.21/csu/libc-start.c:289
#12 0x434d68 in _start (/home/work/github/redis/src/redis-server+0x434d68)
0x000000794004 is located 60 bytes to the left of global variable 'newline_sent' defined in 'replication.c:1617:19' (0x794040) of size 8
0x000000794004 is located 0 bytes to the right of global variable 'usemark' defined in 'replication.c:1753:16' (0x794000) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
Shadow bytes around the buggy address:
0x0000800ea7b0: 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7c0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
0x0000800ea7d0: 00 00 00 00 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7e0: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea7f0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
=>0x0000800ea800:[04]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
0x0000800ea810: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x0000800ea820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800ea830: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9
0x0000800ea840: 04 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea850: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==49320==ABORTING
*** [err]: Sanitizer error: =================================================================
==49373==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000794004 at pc 0x7fd9bf1b050e bp 0x7fff5971b700 sp 0x7fff5971aeb0
READ of size 122880 at 0x000000794004 thread T0
#0 0x7fd9bf1b050d (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
#1 0x5891bb in memtest_preserving_test /home/work/github/redis/src/memtest.c:317
#2 0x545301 in memtest_test_linux_anonymous_maps /home/work/github/redis/src/debug.c:1798
#3 0x545522 in doFastMemoryTest /home/work/github/redis/src/debug.c:1839
#4 0x54c27f in sigsegvHandler /home/work/github/redis/src/debug.c:1936
#5 0x7fd9bf048f9f (/opt/compiler/gcc-8.2/lib/libpthread.so.0+0x10f9f)
#6 0x54865e in debugCommand /home/work/github/redis/src/debug.c:493
#7 0x452206 in call /home/work/github/redis/src/server.c:4908
#8 0x455750 in processCommand /home/work/github/redis/src/server.c:5486
#9 0x49267b in processCommandAndResetClient /home/work/github/redis/src/networking.c:2147
#10 0x49a7c5 in processInputBuffer /home/work/github/redis/src/networking.c:2242
#11 0x4a1faf in readQueryFromClient /home/work/github/redis/src/networking.c:2354
#12 0x6404b6 in callHandler /home/work/github/redis/src/connhelpers.h:79
#13 0x6404b6 in connSocketEventHandler /home/work/github/redis/src/connection.c:295
#14 0x43f6eb in aeProcessEvents /home/work/github/redis/src/ae.c:428
#15 0x44016c in aeMain /home/work/github/redis/src/ae.c:488
#16 0x433a86 in main /home/work/github/redis/src/server.c:8094
#17 0x7fd9beeb4b8d in __libc_start_main /home/liruihao/mygcc82/glibc-2.21/csu/libc-start.c:289
#18 0x434d68 in _start (/home/work/github/redis/src/redis-server+0x434d68)
0x000000794004 is located 60 bytes to the left of global variable 'newline_sent' defined in 'replication.c:1617:19' (0x794040) of size 8
0x000000794004 is located 0 bytes to the right of global variable 'usemark' defined in 'replication.c:1753:16' (0x794000) of size 4
SUMMARY: AddressSanitizer: global-buffer-overflow (/opt/compiler/gcc-8.2/lib/libasan.so.5+0x4250d)
Shadow bytes around the buggy address:
0x0000800ea7b0: 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7c0: 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
0x0000800ea7d0: 00 00 00 00 f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9
0x0000800ea7e0: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea7f0: f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
=>0x0000800ea800:[04]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
0x0000800ea810: 00 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x0000800ea820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0000800ea830: 00 00 00 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9
0x0000800ea840: 04 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9
0x0000800ea850: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==49373==ABORTING
Cleanup: may take some time... OK
Additional information redis branch: unstable gcc version: 8.2.0 (GCC) OS: CentOS release 6.10 (Final) linux kernel: Linux 2.6.32_1-18-0-0
Comment From: oranagra
I'll use this opportunity to report something semi-related that i noticed and didn't have the time to look into: address sanitizer with GCC v7.5.0 on Ubuntu 18.04
./runtest --single unit/scripting produces this:
[err]: Sanitizer error: =================================================================
==1099==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/asan/asan_thread.cc:318 "((ptr[0] == kCurrentStackFrameMagic)) != (0)" (0x0, 0x0)
#0 0x7fd3dc900bf2 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9bf2)
#1 0x7fd3dc91f575 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x108575)
#2 0x7fd3dc905af2 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xeeaf2)
#3 0x7fd3dc844cf7 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2dcf7)
#4 0x7fd3dc845b9d (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x2eb9d)
#5 0x7fd3dc847d7f (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x30d7f)
#6 0x7fd3dc900324 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9324)
#7 0x7fd3dc8650cf (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x4e0cf)
#8 0x55b3776f2aca in read /usr/include/x86_64-linux-gnu/bits/unistd.h:44
#9 0x55b3776f2aca in zmalloc_get_rss /home/oran/work/redis/src/zmalloc.c:395
#10 0x55b3776d4504 in cronUpdateMemoryStats /home/oran/work/redis/src/server.c:3031
#11 0x55b3776da545 in serverCron /home/oran/work/redis/src/server.c:3132
#12 0x55b3776c567e in processTimeEvents /home/oran/work/redis/src/ae.c:319
#13 0x55b3776c567e in aeProcessEvents /home/oran/work/redis/src/ae.c:458
#14 0x55b3776c61ec in aeMain /home/oran/work/redis/src/ae.c:488
#15 0x55b3776b9a09 in main /home/oran/work/redis/src/server.c:8131
#16 0x7fd3dbc86bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#17 0x55b3776bad19 in _start (/home/oran/work/redis/src/redis-server+0xa2d19)
./runtest --single integration/failover
produces a hang in failover command to specific replica works
Comment From: enjoy-binbin
update (in now unstable branch, b40a9ba5fda9b28310964843831890144d8a77c2):
gcc version 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
./runtest --single integration/logging --dump-logs
*** [err]: Sanitizer error: ================================================================= [16/1873]
==10350==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ffe57847018 at pc 0x00000055bb2d bp 0x7ffe57846980 sp 0x7ffe57846970
READ of size 8 at 0x7ffe57847018 thread T0
#0 0x55bb2c in logStackContent /root/redis/self/redis/src/debug.c:1171
#1 0x563b6a in sigsegvHandler /root/redis/self/redis/src/debug.c:1937
#2 0x7f714d6735cf (/lib64/libpthread.so.0+0xf5cf)
#3 0x7f714d395482 in __GI_epoll_wait (/lib64/libc.so.6+0xfe482)
#4 0x44a282 in aeApiPoll /root/redis/self/redis/src/ae_epoll.c:113
#5 0x44a282 in aeProcessEvents /root/redis/self/redis/src/ae.c:404
#6 0x44b3bc in aeMain /root/redis/self/redis/src/ae.c:496
#7 0x43eca1 in main /root/redis/self/redis/src/server.c:6789
#8 0x7f714d2b93d4 in __libc_start_main (/lib64/libc.so.6+0x223d4)
#9 0x43ff56 (/root/redis/self/redis/src/redis-server+0x43ff56)
Address 0x7ffe57847018 is located in stack of thread T0 at offset 24 in frame
#0 0x44a01f in aeProcessEvents /root/redis/self/redis/src/ae.c:358
This frame has 1 object(s):
[32, 48) 'tv' <== Memory access at offset 24 underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-underflow /root/redis/self/redis/src/debug.c:1171 in logStackContent
Shadow bytes around the buggy address:
0x10004af00db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00df0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x10004af00e00: f1 f1 f1[f1]00 00 f2 f2 f3 f3 f3 f3 00 00 00 00
0x10004af00e10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00e20: f1 f1 f1 f1 00 00 f2 f2 f2 f2 f2 f2 00 00 f2 f2
0x10004af00e30: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00e40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x10004af00e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==10350==ABORTING
./runtest --single unit/scripting is ok
./runtest --single integration/failover
hang in failover command to specific replica works, stuck in failover-in-progress for a very long times.. (the server not able to reponse the request, so each call hang)
Comment From: DarrenJiang13
hi @menwenjun, I got the same problem as yours when:
make SANITIZER=address -j
./runtest --single integration/logging
I tried to add ignore option but still got failed
NO_SANITIZE("address")
int memtest_preserving_test(unsigned long *m, size_t bytes, int passes) {
...
}
my OS system is like:
redis branch: unstable
gcc version: 9.2.1 (GCC)
OS: CentOS 7
linux kernel version: 7.2
Have you found the reason ? I check the sanitizer CI and find this test actually succeed in Ubuntu System.
Comment From: tezc
Sorry folks, I didn't see this issue before.
That NO_SANITIZE() suppression will only work with GCC 8.1+. GCC introduced no_sanitize() attribute in GCC 8.1. So, failures with GCC 7.x are because of this I believe.
@DarrenJiang13 I agree we should add "address" suppression to that function but I'm surprised it still fails. Can you confirm you did make distclean after adding that fix? (if you remember by any chance)
Comment From: DarrenJiang13
@tezc I tried again just now, when I use gcc9.2.1 on linux 3.10 and linux 4.19, the test still fails with global-buffer-overflow error even when added "address" suppression. I did make distclean every time. Hard to explain that.
Comment From: tezc
Thanks for confirming. I'm out of ideas. Feels like it's a bug in that GCC version.