RFR: 8331167: UBSan enabled build fails in adlc on macOS
Matthias Baesken
mbaesken at openjdk.org
Fri Apr 26 12:12:56 UTC 2024
When configuring with '--enable-ubsan' (https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) and doing a macOS x86_64 fastdebug build, I run into this build error after very short time :
jdk/src/hotspot/share/adlc/adlparse.cpp:5228:36: runtime error: applying non-zero offset 1 to null pointer
#0 0x103fa4b4b in ADLParser::skipws_common(bool) adlparse.cpp:5228
#1 0x103f76aed in ADLParser::skipws() adlparse.hpp:271
#2 0x103f763c6 in ADLParser::parse() adlparse.cpp:95
#3 0x10407054d in main main.cpp:178
#4 0x7fff2044ef3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)
So it seems that UBSan support is currently not working well on macOS because the build fails early. Seems we add 1 to a nullptr in the adlc code in some cases and UBSAN complains about it.
-------------
Commit messages:
- JDK-8331167
Changes: https://git.openjdk.org/jdk/pull/18976/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18976&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8331167
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/18976.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18976/head:pull/18976
PR: https://git.openjdk.org/jdk/pull/18976
More information about the hotspot-compiler-dev
mailing list