Build using - ./configure CFLAGS="-fsanitize=address -g" LDFLAGS="-fsanitize=address" && make.
Then do "make check"
It reports below error:
FAIL: check_check_export
Running suite(s): Fork Sub
100%: Checks: 3, Failures: 0, Errors: 0
check_check_fork.c:18:P:Core:test_inc:0: Passed
check_check_fork.c:27:P:Core:test_nofork_sideeffects:0: Passed
check_check_fork.c:34:P:Core:test_nofork_pid:0: Passed
Running suite(s): Fix Sub
0%: Checks: 1, Failures: 1, Errors: 0
check_check_fixture.c:16:S:Fix Sub:unchecked_setup:0: Test failure in fixture
Running suite(s): Check Servant
ASAN:SIGSEGV
=================================================================
==21922== ERROR: AddressSanitizer: SEGV on unknown address 0x040b000055a2 (pc 0x2acaa8b5620b sp 0x7fff16a2c4a8 bp 0x7fff16a2c4c0 T0)
AddressSanitizer can not provide additional info.
#0 0x2acaa8b5620a (/lib/x86_64-linux-gnu/libpthread-2.19.so+0x1020a)
#1 0x4061a3 (/home4/check-0.10.0/tests/check_check+0x4061a3)
#2 0x41c5b0 (/home4/check-0.10.0/tests/check_check+0x41c5b0)
#3 0x41b582 (/home4/check-0.10.0/tests/check_check+0x41b582)
#4 0x41bd94 (/home4/check-0.10.0/tests/check_check+0x41bd94)
#5 0x41b433 (/home4/check-0.10.0/tests/check_check+0x41b433)
#6 0x41df17 (/home4/check-0.10.0/tests/check_check+0x41df17)
#7 0x41dbf3 (/home4/check-0.10.0/tests/check_check+0x41dbf3)
#8 0x40a2ac (/home4/check-0.10.0/tests/check_check+0x40a2ac)
#9 0x4130f1 (/home4/check-0.10.0/tests/check_check+0x4130f1)
#10 0x2acaa8d85ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4)
#11 0x401f78 (/home4/check-0.10.0/tests/check_check+0x401f78)
==21922== ABORTING
ASAN:SIGSEGV
=================================================================
==21923== ERROR: AddressSanitizer: SEGV on unknown address 0x040b000055a3 (pc 0x2acaa8b5620b sp 0x7fff16a2c4a8 bp 0x7fff16a2c4c0 T0)
AddressSanitizer can not provide additional info.
#0 0x2acaa8b5620a (/lib/x86_64-linux-gnu/libpthread-2.19.so+0x1020a)
#1 0x40616e (/home4/check-0.10.0/tests/check_check+0x40616e)
#2 0x41c5b0 (/home4/check-0.10.0/tests/check_check+0x41c5b0)
#3 0x41b582 (/home4/check-0.10.0/tests/check_check+0x41b582)
#4 0x41bd94 (/home4/check-0.10.0/tests/check_check+0x41bd94)
#5 0x41b433 (/home4/check-0.10.0/tests/check_check+0x41b433)
#6 0x41df17 (/home4/check-0.10.0/tests/check_check+0x41df17)
#7 0x41dbf3 (/home4/check-0.10.0/tests/check_check+0x41dbf3)
#8 0x40a2ac (/home4/check-0.10.0/tests/check_check+0x40a2ac)
#9 0x4130f1 (/home4/check-0.10.0/tests/check_check+0x4130f1)
#10 0x2acaa8d85ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4)
#11 0x401f78 (/home4/check-0.10.0/tests/check_check+0x401f78)
==21923== ABORTING
ASAN:SIGSEGV
=================================================================
==21924== ERROR: AddressSanitizer: SEGV on unknown address 0x040b000055a4 (pc 0x2acaa8b5620b sp 0x7fff16a2c4a8 bp 0x7fff16a2c4c0 T0)
AddressSanitizer can not provide additional info.
#0 0x2acaa8b5620a (/lib/x86_64-linux-gnu/libpthread-2.19.so+0x1020a)
#1 0x4061a3 (/home4/check-0.10.0/tests/check_check+0x4061a3)
#2 0x41c5b0 (/home4/check-0.10.0/tests/check_check+0x41c5b0)
#3 0x41b582 (/home4/check-0.10.0/tests/check_check+0x41b582)
#4 0x41bd94 (/home4/check-0.10.0/tests/check_check+0x41bd94)
#5 0x41b433 (/home4/check-0.10.0/tests/check_check+0x41b433)
#6 0x41df17 (/home4/check-0.10.0/tests/check_check+0x41df17)
#7 0x41dbf3 (/home4/check-0.10.0/tests/check_check+0x41dbf3)
#8 0x40a2ac (/home4/check-0.10.0/tests/check_check+0x40a2ac)
#9 0x4130f1 (/home4/check-0.10.0/tests/check_check+0x4130f1)
#10 0x2acaa8d85ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4)
#11 0x401f78 (/home4/check-0.10.0/tests/check_check+0x401f78)
==21924== ABORTING
Gaurav,
Thanks for the bug report.
I've not used ASAN before, but from what I've read and understand one thing it will attempt to do is report when and where a process throws a signal, right? The issue you mentioned I can reproduce on my system. I think that the specific test which is failing is intentionally throwing the SEGV signal and showing that the test framework can properly detect it. One example is the
test_segv_pass
test here:
http://sourceforge.net/p/check/code/HEAD/tree/trunk/tests/check_check_sub.c#l545
I think that ASAN is catching those signals, which are actually intentional.
However, if you are able to find a minimal program which does not intentionally throw a signal and ASAN finds an issue, kindly let us know.
Gaurav,
Thanks for the bug report.
I've not used ASAN before, but from what I've read and understand one thing
it will attempt to do is report when and where a process throws a signal,
right? The issue you mentioned I can reproduce on my system. I think that
the specific test which is failing is intentionally throwing the SEGV
signal and showing that the test framework can properly detect it. One
example is the
test_segv_pass
test here:
http://sourceforge.net/p/check/code/HEAD/tree/trunk/tests/check_check_sub.c#l545
I think that ASAN is catching those signals, which are actually intentional.
However, if you are able to find a minimal program which does not
intentionally throw a signal and ASAN finds an issue, kindly let us know.
On Mon, Nov 23, 2015 at 10:25 PM, Gaurav ya1gaurav@users.sf.net wrote:
Related
Bugs:
#113