I compiled my code with -fsanitize=address
on centOS 7.2.1511. When I updated gcc to 7.1.0, it can't generate core dump file anymore. Can anybody help me?
gcc compile options:
-lm -g3 -Wall -Wno-unknown-pragmas --std=c++11 -Werror -ggdb -fsanitize=address -fno-omit-frame-pointer -D_GLIBCXX_USE_CXX11_ABI=0
link options:
-lxml2 -lpthread -lmysqlclient -L/usr/lib64/mysql/ -llog4cxx -lprotobuf -llua -lluabind -lhiredis -lcrypto -lcurl -ljsoncpp -Wl,-E -fsanitize=address -ldl
When I used gcc 4.8.5, core dump was normally generated with the option ASAN_OPTIONS set like this:
export ASAN_OPTIONS="disable_core=0:unmap_shadow_on_exit=1:abort_on_error=1"
When I updated gcc to 7.1.0, core dump can't generate anymore, even if the ASAN_OPTIONS is set like above.
Problem is solved.The new sanitizer option ASAN_OPTIONS should be set is "disable_coredump",I set it like this: