-
-
Notifications
You must be signed in to change notification settings - Fork 649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test executable_dll_and_plugin fails on Linux, GCC 8.1.0, -fsanitize=address #201
Comments
doctest runs all the tests on the travis CI with asan/ubsan/tsan and this passes there without trouble... Can you test with Clang as well? The sanitizers are usually best integrated with clang. I've hit many such toolchain issues in the past where a specific version of the compiler or something else is causing problems and I'm highly suspicious that this is the case here as well. |
I am not hitting this with clang, neither v6, nor v7. However, the issue persists when I try with the latest GCC (8.3.0). I believe that sanitizers actually share the same backend these days (upstream says so, at least), and given that the latest compiler release from GCC fails the test suite, I think that this is relevant. |
So the problem is present both with gcc 8.1 and 8.3? This is the GCC that is used on the CI: About the sanitizers - I've previously reported bugs to GCC on linux about their integration with the sanitizers (example) - there were issues not present with clang, so it is very much a possibility that something isn't right for a particular patch of gcc. Maybe Maybe something else on your platform is causing this since it is a project with multiple shared objects. Try with the gold linker? I use it because there were issues with unrecognized flags by the default linker on the CI like doctest is using exceptions in a standards-conforming and simple way so I seriously doubt that there is an issue on the side of the framework. I'm keeping the issue open but for now I have no clue as to what the reason might be. |
seems that this is the flag which fixes the issue: |
Description
Using commit b2611a1 (latest master), test
executable_dll_and_plugin
fails:It would be nice if the test suite run
diff
automatically, but anyway, here we go:Extra information
Starting to parse CMake project, using: "-DCMAKE_BUILD_TYPE:STRING=Debug", "-DCMAKE_CXX_COMPILER:STRING=/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0/x86_64-pc-linux-gnu-g++", "-DCMAKE_CXX_FLAGS:STRING=-fsanitize=address", "-DCMAKE_C_COMPILER:STRING=/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0/x86_64-pc-linux-gnu-gcc-8.1.0", "-DCMAKE_C_FLAGS:STRING=-fsanitize=address", "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fsanitize=address", "-DCMAKE_EXPORT_COMPILE_COMMANDS:INTERNAL=ON", "-DCMAKE_INSTALL_PREFIX:STRING=/opt/nc", "-DCMAKE_INSTALL_RPATH:INTERNAL=/opt/nc/lib64", "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:INTERNAL=ON", "-DCMAKE_LINKER:STRING=/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0/x86_64-pc-linux-gnu-gcc-8.1.0", "-DCMAKE_MODULE_LINKER_FLAGS:STRING=-fsanitize=address", "-DCMAKE_PREFIX_PATH:STRING=/opt/nc", "-DCMAKE_SHARED_LINKER_FLAGS:STRING=-fsanitize=address", "-DENABLE_BUILD_TESTS:STRING=ON", "-DGEN_CPP_BINDINGS:BOOL=ON", "-DGEN_JAVA_BINDINGS:BOOL=OFF", "-DGEN_LANGUAGE_BINDINGS:BOOL=ON", "-DGEN_LUA_BINDINGS:BOOL=OFF", "-DGEN_PYTHON_BINDINGS:BOOL=OFF", "-DKEYSTORED_DEFER_SSH_KEY:BOOL=ON", "-DKEYSTORED_KEYS_DIR:INTERNAL=/opt/nc/etc/keystored/keys", "-DSYSREPOCTL_ROOT_PERMS:INTERNAL=-p 600", "-DTHREADS_HAVE_PTHREAD_ARG:BOOL=ON", "-DUSE_SR_MEM_MGMT:BOOL=OFF".
Custom env:
I have not dug into this, but given that this is an ASAN build, it would be an error if the test links together TUs compiled or linked with and without
-fsanitize=address
. Maybe that's irrelevant. Either way, I'm quite sure that my build env is sane.The text was updated successfully, but these errors were encountered: