Fail to make images when enable ASan for OpenJDK X86 with LLVM toolchain

Leslie Zhai zhaixiang at
Tue Mar 19 15:33:40 UTC 2019


I want to run dynamic analysis test with the help of Address Sanitizer.  
And I read the blog 'Running Java with AddressSanitizer'[1]  wrote by 
Artem who also added support for ASan[2].  Thanks for his great job!

But I failed to make images for X86:

Compiling 4 files for BUILD_JIGSAW_TOOLS
ERROR: Invalid value for bool option: '0"'
ERROR: Flag parsing failed.
ExplodedImageOptimize.gmk:39: recipe for target 
gmake[3]: *** 
Error 1
make/Main.gmk:372: recipe for target 'exploded-image-optimize' failed
gmake[2]: *** [exploded-image-optimize] Error 1

ERROR: Build failed for target 'images' in configuration 
'linux-x86_64-server-fastdebug' (exit code 2)
Stopping sjavac server

=== Output from failing command(s) repeated here ===
* For target jdk__optimize_image_exec:
ERROR: Invalid value for bool option: '0"'
ERROR: Flag parsing failed.

----- 8< -------- 8< -------- 8< -------- 8< -------- 8< -------- 8< ---

jdk__optimize_image_exec.cmdline[3], jdk__optimize_image_exec.log[4],  
and dynamic analysis report[5] by running the cmdline.

using configure arguments '--with-toolchain-type=clang 
--disable-warnings-as-errors --enable-asan 
--with-boot-jdk=/home/xiangzhai/jdk-11.0.2 --with-debug-level=fastdebug'

----- 8< -------- 8< -------- 8< -------- 8< -------- 8< -------- 8< ---

And I also make images with extra CFLAGS, CXXFLAGS and LDFLAGS to enable 
TSan for mips64el with LLVM toolchain especially integrated assembler:

sh configure --with-toolchain-type=clang \
   --disable-warnings-as-errors \
   --with-debug-level=fastdebug \
   --with-extra-cflags="-fintegrated-as -fsanitize=thread" \
   --with-extra-cxxflags="-fintegrated-as -fsanitize=thread" \

Although successfully built,  it means make hotspot works,  
failed to bootstrap near the end of make images.

So workaround might be make images at first without ASan nor TSan, then 
make hotspot with ASan or TSan?


Leslie Zhai






More information about the build-dev mailing list