clang Memory sanitizer (msan) and OpenJDK
Baesken, Matthias
matthias.baesken at sap.com
Tue Apr 29 15:44:59 UTC 2025
>Could it be that the -Wl,--exclude-libs,ALL “hides” the msan symbols like __msan_param_tls from exporting ?
>But I guess we set this for a reason so removing it might cause other trouble ?
Seems the -Wl,--exclude-libs,ALL is the setting that caused the msan build issue, when I remove it the build works until the first “new” binary is executed and runs into :
==64305==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7fbe17639b01 (/builddir/jdk/lib/server/libjvm.so+0x246bb01) (BuildId: b0fcd4709b54740840412c9e6ff0c9ce284848e5)
#1 0x7fbe18ba4751 (/builddir/jdk/lib/server/libjvm.so+0x39d6751) (BuildId: b0fcd4709b54740840412c9e6ff0c9ce284848e5)
#2 0x7fbe17489e64 (/builddir/jdk/lib/server/libjvm.so+0x22bbe64) (BuildId: b0fcd4709b54740840412c9e6ff0c9ce284848e5)
#3 0x7fbe18bc90ab (/builddir/jdk/lib/server/libjvm.so+0x39fb0ab) (BuildId: b0fcd4709b54740840412c9e6ff0c9ce284848e5)
#4 0x7fbe176e695b (/builddir/jdk/lib/server/libjvm.so+0x251895b) (BuildId: b0fcd4709b54740840412c9e6ff0c9ce284848e5)
#5 0x7fbe1ae182d8 (/builddir/jdk/bin/../lib/libjli.so+0x112d8) (BuildId: 6ae5315fdc089fba90719ba08ab0373371f52bf5)
#6 0x7fbe1ae23358 (/builddir/jdk/bin/../lib/libjli.so+0x1c358) (BuildId: 6ae5315fdc089fba90719ba08ab0373371f52bf5)
#7 0x7fbe1add06e9 (/lib64/libpthread.so.0+0xa6e9) (BuildId: 938e42b7e407d175ee3ef9a89c038168101d330c)
#8 0x7fbe1ab4558e (/lib64/libc.so.6+0x11858e) (BuildId: 74f77bf013a66413c77197c121955e029c32d259)
Unfortunately the functions and line numbers from the backtrace are not (yet) nicely displayed , guess this needs some improvement .
When calling addr2line on libjvm.so with the last address from the stack , I get jfrThreadLocal.cpp:81 .
Best regards, Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20250429/0341f4c9/attachment-0001.htm>
More information about the build-dev
mailing list