RFR: 8331167: UBSan enabled build fails in adlc on macOS
Thomas Stuefe
stuefe at openjdk.org
Fri Apr 26 12:32:34 UTC 2024
On Fri, 26 Apr 2024 12:06:28 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> 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.
+1
-------------
Marked as reviewed by stuefe (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18976#pullrequestreview-2024929595
More information about the hotspot-compiler-dev
mailing list