-
Notifications
You must be signed in to change notification settings - Fork 484
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
fsanitize=undefined in parent project causes to link due to missing rtti infos in soci.so #1103
Comments
Hm it gets even weirder after I disable the vptr sanitizer. After successful build it fails with further lookup errors:
|
Sorry, no idea what's going on here but it would definitely be best to compile both SOCI and your project with the same options. |
Export all session_backend-derived classes as they can be used in the application code, and some of them were actually used in our own tests. Also export ref_counted_prepare_info and ref_counted_statement classes to make their type info information accessible from outside the library: this is needed at least when UBSAN and, more precisely, its vtbl sanitizer, is used, as it uses typeinfo. Closes SOCI#1103.
This was actually due to UBSAN vtbl sanitizer which really needs typeinfo to be accessible, so I've fixed it in the commit linked above now and the problem will be fixed once #1172 is merged. |
Hi :)
I am using soci in my project via meson (essentially via cmake). In my project, I wanted to use
-fsanitize=address,undefined
. So far so good. However, while using this with clang++16 I got the following linker errors with soci:The sourcecode for this can be found at https://github.com/MTRNord/persephone/tree/291b037e5f57e2eabb0b214509de9c231061e8ea
Relevant in the meson.build is probably only that I disable the boost part and use lto. However, neither seem to make any difference in outcome.
I am targeting c++20 if this matters.
(also sorry if I miss some obvious thing here. I am still fairly new to C++)
The whole project compiled fine if I remove the
undefined
sanitizer. (Likely because then no RTTI is required)The text was updated successfully, but these errors were encountered: