Hi All,
I'm trying to run ASan on a project. During the self test phase, the project copies its binaries into a temporary directory and executes from that directory. This appears to cause problems for asan_symbolize.
Here's the recipe I've been using to invoke Asan:
export CC=/usr/local/bin/clang
export CXX=/usr/local/bin/clang++
export CFLAGS="-g3 -fsanitize=address -fsanitize=undefined"
export CXXFLAGS="-g3 -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr"
./configure
make
make check 2>&1 | asan_symbolize.py
A typical output is below.
Any ideas how to help asan_symolize find the symbols needed for instrumentation?
Thanks in advance.
Jeff
creating configuration files ... ok
creating template1 database in /home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/./tmp_check/data/base/1 ...
relmapper.c:670:2: runtime error: left shift of negative value -1
...
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ...
=================================================================
==20535==ERROR: AddressSanitizer: strncpy-param-overlap: memory ranges [0x61d00001074c,0x61d00001074e) and [0x61d00001074c, 0x61d00001074e) overlap
#0 0x474bc6 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x474bc6)
#1 0x36fc0d1 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x36fc0d1)
#2 0x529fc7 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x529fc7)
#3 0x41d5149 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x41d5149)
#4 0x41bc3fa (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x41bc3fa)
#5 0x41be3fa (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x41be3fa)
#6 0x1618813 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x1618813)
#7 0x155c9f6 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x155c9f6)
#8 0x15527e6 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x15527e6)
#9 0x151529f (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x151529f)
#10 0x1506ef2 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x1506ef2)
#11 0x1505e64 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x1505e64)
#12 0x15f8f61 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x15f8f61)
#13 0x15faf3e (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x15faf3e)
#14 0x112ac81 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x112ac81)
#15 0x110ef0c (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x110ef0c)
#16 0x110d674 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x110d674)
#17 0x30602a2 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30602a2)
#18 0x10b366d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x10b366d)
#19 0x4190e09 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4190e09)
#20 0x10adc85 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x10adc85)
#21 0x194e3b3 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x194e3b3)
#22 0x30bddfc (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30bddfc)
#23 0x30b6f91 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30b6f91)
#24 0x30afd3d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30afd3d)
#25 0x30ac530 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30ac530)
#26 0x30a372d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30a372d)
#27 0x309c37a (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x309c37a)
#28 0x3071fc5 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x3071fc5)
#29 0x306cc39 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x306cc39)
#30 0x21f81b7 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x21f81b7)
#31 0x2b212137eea4 (/lib/x86_64-linux-gnu/
libc-2.17.so+0x21ea4)
#32 0x48488c (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x48488c)
0x61d00001074c is located 716 bytes inside of 2048-byte region [0x61d000010480,0x61d000010c80)
allocated by thread T0 here:
#0 0x4767f4 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4767f4)
#1 0x4349a7b (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4349a7b)
#2 0x435c09d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x435c09d)
#3 0xa2d187 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0xa2d187)
#4 0x4183c06 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4183c06)
#5 0x99f897 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x99f897)
#6 0x99e5cf (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x99e5cf)
#7 0x99698b (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x99698b)
#8 0x3f6a4fd (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x3f6a4fd)
#9 0x4097d8e (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4097d8e)
#10 0x409900d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x409900d)
#11 0xefe5f4 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0xefe5f4)
#12 0x162a429 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x162a429)
#13 0x1953ee8 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x1953ee8)
#14 0x194c6d0 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x194c6d0)
#15 0x30bddfc (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30bddfc)
#16 0x30b6f91 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30b6f91)
#17 0x30afd3d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30afd3d)
#18 0x30ac530 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30ac530)
#19 0x30a372d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30a372d)
#20 0x309c37a (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x309c37a)
#21 0x3071fc5 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x3071fc5)
#22 0x306cc39 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x306cc39)
#23 0x21f81b7 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x21f81b7)
#24 0x2b212137eea4 (/lib/x86_64-linux-gnu/
libc-2.17.so+0x21ea4)
0x61d00001074c is located 716 bytes inside of 2048-byte region [0x61d000010480,0x61d000010c80)
allocated by thread T0 here:
#0 0x4767f4 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4767f4)
#1 0x4349a7b (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4349a7b)
#2 0x435c09d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x435c09d)
#3 0xa2d187 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0xa2d187)
#4 0x4183c06 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4183c06)
#5 0x99f897 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x99f897)
#6 0x99e5cf (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x99e5cf)
#7 0x99698b (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x99698b)
#8 0x3f6a4fd (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x3f6a4fd)
#9 0x4097d8e (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x4097d8e)
#10 0x409900d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x409900d)
#11 0xefe5f4 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0xefe5f4)
#12 0x162a429 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x162a429)
#13 0x1953ee8 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x1953ee8)
#14 0x194c6d0 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x194c6d0)
#15 0x30bddfc (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30bddfc)
#16 0x30b6f91 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30b6f91)
#17 0x30afd3d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30afd3d)
#18 0x30ac530 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30ac530)
#19 0x30a372d (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x30a372d)
#20 0x309c37a (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x309c37a)
#21 0x3071fc5 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x3071fc5)
#22 0x306cc39 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x306cc39)
#23 0x21f81b7 (/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/tmp_check/install/usr/local/pgsql/bin/postgres+0x21f81b7)
#24 0x2b212137eea4 (/lib/x86_64-linux-gnu/
libc-2.17.so+0x21ea4)
==20535==ABORTING
child process exited with exit code 1
initdb: data directory "/home/jwalton/Desktop/postgresql-9.3.1/src/test/regress/./tmp_check/data" not removed at user's request