clang Memory sanitizer (msan) and OpenJDK

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Jun 19 15:06:59 UTC 2025


Hi Matthias,

Getting back to this far too late... Sorry.

On 2025-04-30 15:28, Baesken, Matthias wrote:

> I installed the llvm package to get the   /usr/bin/llvm-symbolizer   
> (this seems to be needed to get  meaningful stacks) .
>
> Brought back the visibility=hidden settings, seems they do no harm  to 
> msan  .   However the removal  of -Wl,--exclude-libs,ALL      is needed.
>
I think there might be ways around that to tell the linker to actually 
keep the symbols we need. If you want to pursue integrating msan into 
the JDK build properly, we can explore that. If so, we should also check 
for the presence of llvm-symbolizer in configure and warn if it is 
missing (though I guess the real question is if it is present at 
runtime...).

> Seems msan is unhappy about the thread != nullptr   in line 81  of 
> jfrThreadLocal.cpp
>
>   Thread* thread = Thread::current_or_null();
>
>   _parent_trace_id = thread != nullptr ? jvm_thread_id(thread) : 
> (traceid)0;
>
> Not sure why this is reported as  uninitialized ?
>
I have no idea.

Did you pursue this any further, or did you give up?

/Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20250619/40f5bfd4/attachment.htm>


More information about the build-dev mailing list