On 2024-10-09 09:39, Baesken, Matthias wrote:
Hi,
I wanted to try the "minimal runtime" option of ubsan because it might
be faster and has other benefits.
See
https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#minimal-runtime
<https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#minimal-runtime>
Unfortunately it seems to be available only with clang on Linux, not
(yet?) gcc, so I configured
--with-additional-ubsan-checks=-fsanitize-minimal-runtime
--with-toolchain-type=clang
but after some compilation I run into this link error :
jdk/lib/server/libjvm.so: undefined symbol:
__ubsan_handle_type_mismatch_minimal
Any ideas what's wrong here ?
https://github.com/systemd/systemd/issues/26975
<https://github.com/systemd/systemd/issues/26975>
suggests that we might need to adjust the linker settings to allow
undefined symbols , not sure if this is the same issue ?
I'd say it looks like you need to link with another library? Where
should the __ubsan_handle_type_mismatch_minimal symbol come from?
On the other hand, I tried the minimal runtime option with some
standalone program examples outside the OpenJDK, and
The error output was indeed “minimal” (without line numbers of the
error); so it looked not very useful to me but this might be my
limited understanding.
So what you're saying is that it is not really worth spending any time
on sorting this out?
/Magnus
Any experience with this option ?
Best regards, Matthias