CI: ASan job does not have debug info available
Steps to reproduce
- Introduce a memory safety bug in code exercised by the test suite
- Push this to a branch
- Observe the CI failure of the
ubuntu-22.04-cmake-ASan-test-including-ctest
job
Expected Behaviour
Useful report.
Actual Behaviour
A backtrace lacking filenames and line numbers:
==3825==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000028390 at pc 0x7f0d23efef8d bp 0x7ffedfa9ebb0 sp 0x7ffedfa9eba0
WRITE of size 8 at 0x602000028390 thread T0
#0 0x7f0d23efef8c (/lib+0x547f8c)
#1 0x7f0d23f00c0f (/lib+0x549c0f)
#2 0x7f0d23f31a40 (/lib+0x57aa40)
#3 0x7f0d23f37d0c (/lib+0x580d0c)
#4 0x7f0d23f446f7 (/lib+0x58d6f7)
#5 0x7f0d23f46a6d (/lib+0x58fa6d)
#6 0x7f0d23f486a1 (/lib+0x5916a1)
#7 0x7f0d23f5312a (/lib+0x59c12a)
#8 0x561e3950416d in main /builds/smattr/graphviz/cmd/dot/dot.c:73
#9 0x7f0d22c29d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
#10 0x7f0d22c29e3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e3f)
#11 0x561e39503d54 in _start (/usr/bin/dot+0x7e0d54)
0x602000028394 is located 0 bytes to the right of 4-byte region [0x602000028390,0x602000028394)
allocated by thread T0 here:
#0 0x7f0d27948c38 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
#1 0x7f0d23eed170 (/lib+0x536170)
#2 0x7f0d23eed50f (/lib+0x53650f)
#3 0x7f0d23efee1e (/lib+0x547e1e)
#4 0x7f0d23f00c0f (/lib+0x549c0f)
#5 0x7f0d23f31a40 (/lib+0x57aa40)
#6 0x7f0d23f37d0c (/lib+0x580d0c)
#7 0x7f0d23f446f7 (/lib+0x58d6f7)
#8 0x7f0d23f46a6d (/lib+0x58fa6d)
#9 0x7f0d23f486a1 (/lib+0x5916a1)
#10 0x7f0d23f5312a (/lib+0x59c12a)
#11 0x561e3950416d in main /builds/smattr/graphviz/cmd/dot/dot.c:73
#12 0x7f0d22c29d8f (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)
E.g. https://gitlab.com/smattr/graphviz/-/jobs/6422317441
OS Version
Ubuntu 22.04 in CI.
Graphviz Version
Branched off f8a3405d.
Additional info
Debug info apparently is available for dot
. We’re just missing it for the libraries, like libgvc. Not sure exactly why as the build job itself seems to be setting the relevant stuff in a globally exported way.