-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Build fails on clang 10 with UBSAN #76
Comments
...and when I add
I'm building stuff (other libraries and applications) with UBSAN just fine otherwise. Demangler says that this is:
This particular error goes away if I remove |
You are using |
@doug-moen , there's just one Anyway, I tried what you propose, and there's apparently no change on my test system:
Notice that the linker in the first call gets "somehow" set "to the C compiler" by the build system. Also, that first target is not C++ code, it's a C code if I'm aprsing its name correctly. |
I see two errors in your build. The first error happens when linking replxx-example-c-api, which is a C program, but it is being linked with a C++ library. The problem is that cmake is using the C compiler to link a C++ program. cmake is passing To test my hypothesis about the first link error, you can take the linker command that cmake is running:
and you can modify this command to invoke How to configure cmake to use the C++ compiler to link replxx-example-c-api is a separate issue. The second build error occurs when linking |
Does |
I'm on clang 10.0.0:
And I cannot build replxx when using USAN (
-fsanitize=undefined
):I can reproduce this on a Gentoo Linux system with clang 10, and on Fedora 31 with clang 9. Configuring with (
-DREPLXX_BUILD_EXAMPLES=OFF
) makes this problem go away.The text was updated successfully, but these errors were encountered: