[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
nucobol-3.1-rc1 and Asan findings
From: |
Jeffrey Walton |
Subject: |
nucobol-3.1-rc1 and Asan findings |
Date: |
Mon, 13 Jul 2020 19:57:29 -0400 |
Hi Everyone,
Here's the result of a 'make check' when using '-fsanitize=address'.
It looks like there are a few new failures.
This is a good result. I usually see a lot more Asan findings. The 577
test result looks important. It is a use-after-free.
19: run job after compilation FAILED
(used_binaries.at:638)
20: run job after compilation (path specified) ok
21: run job with optional arguments FAILED
(used_binaries.at:680)
...
577: Recursive CALL of RECURSIVE program FAILED (run_misc.at:1305)
...
660: Trace feature with subroutine FAILED (run_misc.at:7517)
...
763: EXTFH: using ISAM callback FAILED (run_file.at:7084)
764: EXTFH: SEQUENTIAL files FAILED (run_file.at:7450)
765: EXTFH: LINE SEQUENTIAL files, direct EXTFH ok
766: INDEXED File READ/DELETE/READ FAILED (run_file.at:8398)
...
953: ASSIGN directive FAILED
(run_extensions.at:2029)
$ cat tests/testsuite.dir/0577/testsuite.log
# -*- compilation -*-
577. run_misc.at:1253: testing Recursive CALL of RECURSIVE program ...
./run_misc.at:1302: $COMPILE caller.cob
./run_misc.at:1303: $COMPILE_MODULE callee.cob
./run_misc.at:1304: $COMPILE_MODULE callee2.cob
./run_misc.at:1305: $COBCRUN_DIRECT ./caller
--- /dev/null 2020-07-10 09:37:43.139999945 -0400
+++
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/tests/testsuite.dir/at-groups/577/stderr
2020-07-13 19:50:42.168880606 -0400
@@ -0,0 +1,68 @@
+=================================================================
+==22299==ERROR: AddressSanitizer: heap-use-after-free on address
0x611000002eb0 at pc 0x7f3baa9ddea1 bp 0x7ffe3805e9f0 sp
0x7ffe3805e9e0
+READ of size 8 at 0x611000002eb0 thread T0
+ #0 0x7f3baa9ddea0 in do_cancel_module
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/call.c:362
+ #1 0x7f3baa9ddea0 in cob_cancel
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/call.c:1123
+ #2 0x555b9b777404 in caller_ /home/jwalton/tmp/cob22231_0.c:128
+ #3 0x555b9b776cf0 in caller /home/jwalton/tmp/cob22231_0.c:46
+ #4 0x555b9b776cd4 in main /home/jwalton/tmp/cob22231_0.c:34
+ #5 0x7f3baa580b96 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
+ #6 0x555b9b776bc9 in _start
(/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/tests/testsuite.dir/0577/caller+0x1bc9)
+
+0x611000002eb0 is located 48 bytes inside of 240-byte region
[0x611000002e80,0x611000002f70)
+freed by thread T0 here:
+ #0 0x7f3baad3b7a8 in __interceptor_free
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7a8)
+ #1 0x7f3baa978364 in cob_cache_free
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/common.c:1770
+ #2 0x7f3baa9788b7 in cob_module_free
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/common.c:2341
+ #3 0x7f3ba5cfd1cd in callee_ /home/jwalton/tmp/cob22255_0.c:148
+ #4 0x7f3ba5cfc9a7 in callee /home/jwalton/tmp/cob22255_0.c:38
+ #5 0x555b9b7772e6 in caller_ /home/jwalton/tmp/cob22231_0.c:118
+ #6 0x555b9b776cf0 in caller /home/jwalton/tmp/cob22231_0.c:46
+ #7 0x555b9b776cd4 in main /home/jwalton/tmp/cob22231_0.c:34
+ #8 0x7f3baa580b96 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
+
+previously allocated by thread T0 here:
+ #0 0x7f3baad3bd28 in __interceptor_calloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
+ #1 0x7f3baa984fe0 in cob_malloc
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/common.c:1637
+ #2 0x7f3baa986b6e in cob_cache_malloc
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/common.c:1723
+ #3 0x7f3baa9951e9 in cob_module_global_enter
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/common.c:2255
+ #4 0x7f3ba5cfcad2 in callee_ /home/jwalton/tmp/cob22255_0.c:61
+ #5 0x7f3ba5cfc9a7 in callee /home/jwalton/tmp/cob22255_0.c:38
+ #6 0x555b9b7772e6 in caller_ /home/jwalton/tmp/cob22231_0.c:118
+ #7 0x555b9b776cf0 in caller /home/jwalton/tmp/cob22231_0.c:46
+ #8 0x555b9b776cd4 in main /home/jwalton/tmp/cob22231_0.c:34
+ #9 0x7f3baa580b96 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
+
+SUMMARY: AddressSanitizer: heap-use-after-free
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/libcob/call.c:362 in
do_cancel_module
+Shadow bytes around the buggy address:
+ 0x0c227fff8580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 0x0c227fff8590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa
+ 0x0c227fff85a0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
+ 0x0c227fff85b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 0x0c227fff85c0: 00 00 00 00 00 fa fa fa fa fa fa fa fa fa fa fa
+=>0x0c227fff85d0: fd fd fd fd fd fd[fd]fd fd fd fd fd fd fd fd fd
+ 0x0c227fff85e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa
+ 0x0c227fff85f0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
+ 0x0c227fff8600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+ 0x0c227fff8610: 00 00 00 00 00 fa fa fa fa fa fa fa fa fa fa fa
+ 0x0c227fff8620: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
+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
+==22299==ABORTING
--- - 2020-07-13 19:50:42.176436830 -0400
+++
/home/jwalton/Build-Scripts/gnucobol-3.1-rc1/tests/testsuite.dir/at-groups/577/stdout
2020-07-13 19:50:42.172880656 -0400
@@ -1 +1 @@
-OK + FINE
+
./run_misc.at:1305: exit code was 1, expected 0
577. run_misc.at:1253: 577. Recursive CALL of RECURSIVE program
(run_misc.at:1253): FAILED (run_misc.at:1305)
config.log.zip
Description: Zip archive
test-suite.log.zip
Description: Zip archive
- nucobol-3.1-rc1 and Asan findings,
Jeffrey Walton <=