Closed RaymondZuo301 closed 5 years ago
hm... strange, it looks your gcc installation is somehow corrupt?. might be a defect gcc installation? Did you try to look at: https://github.com/google/sanitizers/issues/679
FWIW non-empty /etc/ld.so.preload was an exact reason why GCC 6 didn't work (ASan runtime indeed wasn't first in initial library list). GCC 4.9 works just because it's too old and doesn't have this sanity check.
I would recommend using clang6.0. Asan is only enabled in Debug builds...
thanks a lot, i will try clang6.0
did it solve the problem?
Just an FYI - I had a similar problem with WSL release build. Line 46 in SetTargetCompileOptions.cmake sets the link flags with -fsanitize=leak -fsanitize=address which causes the release library to also link to libasan. I think you want to use LINK_FLAGS_DEBUG, not LINK_FLAGS. I will make a pull request.
when i run example/ApproxMVBBExample-MVBB i got this
i have to run
export LD_PRELOAD=$LD_PRELOAD:/usr/lib/x86_64-linux-gnu/libasan.so.2
every time before running the example to make it correct. ubuntu 16.04 gcc5.4