RFR: 8352420: [ubsan] codeBuffer.cpp:984:27: runtime error: applying non-zero offset 18446744073709486080 to null pointer

Matthias Baesken mbaesken at openjdk.org
Thu Mar 20 10:27:52 UTC 2025


On Wed, 19 Mar 2025 15:43:54 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

> This PR addresses undefined behavior in CodeBuffer by making `verify_section_allocation` return early for a partially initialized CodeBuffer.

Yeah we had a couple of those shift issues  see https://github.com/openjdk/jdk/pull/24118#issuecomment-2739695432 
Not sure why I do not see those, have to check.

> Yeah we had a couple of those shift issues see [#24118 (comment)](https://github.com/openjdk/jdk/pull/24118#issuecomment-2739695432) Not sure why I do not see those, have to check.

I found why it builds on my side - I set the additional configure parameter for macOS aarch64
`--enable-ubsan --with-additional-ubsan-checks=-fno-sanitize=shift-exponent`

With your patch applied I do not see the failure any more,
compiler/jvmci/errors/TestInvalidCompilationResult
runs successfully.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24118#issuecomment-2739724304
PR Comment: https://git.openjdk.org/jdk/pull/24118#issuecomment-2739835042
PR Comment: https://git.openjdk.org/jdk/pull/24118#issuecomment-2739851580


More information about the hotspot-compiler-dev mailing list