hg: tsan/dev: Supports statically linking TSAN runtime into the launcher with Clang.

manc at google.com manc at google.com
Tue May 14 19:17:42 UTC 2019


Changeset: f761a445f8ed
Author:    manc
Date:      2019-05-13 19:22 -0700
URL:       http://hg.openjdk.java.net/tsan/dev/rev/f761a445f8ed

Supports statically linking TSAN runtime into the launcher with Clang.

This is a workaround for the version issue with libtsan.so in GCC.
If we build the JDK with Clang, we will have a newer version of the
TSAN runtime statically linked into the launcher:

$ nm images/jdk/bin/java | grep tsan_symbolize
000000000048e640 W __tsan_symbolize_external
000000000048e650 W __tsan_symbolize_external_ex

In the long term, Java TSAN will still work with GCC, but stack trace
symbolization will be broken until OpenJDK can be built with GCC9,
which contains the new version of libtsan.so that we need.

Also need to write distinct values to the global variable in
libAbstractNativeLoop.cpp, otherwise some optimization in Clang
could treat the variable as constant, and TSAN reports "Write of size 1"
instead of "size 4".

Reviewed-by: jcbeyler, aeubanks

! make/launcher/LauncherCommon.gmk
! make/test/JtregNativeHotspot.gmk
! test/hotspot/jtreg/tsan/libAbstractNativeLoop.cpp



More information about the tsan-dev mailing list