How to integrate Tsan with OpenJDK

Florian Weimer fweimer at redhat.com
Thu Mar 14 12:41:25 UTC 2019


* Jean Christophe Beyler:

> Florian Weimer said in
> https://mail.openjdk.java.net/pipermail/discuss/2019-March/005007.html:
>
> "If OpenJDK starts to poke at libc internals, like the sanitizers do today, OpenJDK will
> potentially need porting to each new libc version.
>
> You will not be able to run older OpenJDK versions on newer libcs, as it is possible today.
>
> It will likely make it more complicated to build binaries which are compatible with a wide
> range of systems.
>
> This is what we see with the sanitizers in LLVM and GCC today.  If you copy a variant of this
> code into OpenJDK, you will have the same problem."
>
> The conversation here is:
>   - How do we distribute OpenJDK with a TSAN implementation?
>     - What does that look like?
>    - What restrictions/promises to users should we make? What should we not make as
> promises?
>
> I have no answers to these (though I have opinions :-)); I open the
> floor to others who would want to talk/think about these issues...

I should point out that this only applies to the native TSAN code with
its interceptors.  I don't know if there's a plan to support tracking
across JNI boundaries and integrate with the native TSAN.

If the plan is integration with native TSAN, it could be an opportunity
to clean this up (finally).

Thanks,
Florian


More information about the tsan-dev mailing list