RFR: JDK-8302102: Disable ASan for SafeFetch and os::print_hex_dump
Justin King
jcking at openjdk.org
Thu Feb 9 17:43:51 UTC 2023
On Thu, 9 Feb 2023 10:02:49 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> Seems fine.
>
> Please build and test zero before pushing (gtests are fine).
If we are talking about without ASan, it works fine. With ASan is a different story...
So, Zero does a bunch of things that are not acceptable and fails to finish the build while optimizing the image. It triggers stack-use-after-scope and global-buffer-overflow. The first is in `ZeroInterpreter::native_entry(Method*, long, JavaThread*) src/hotspot/cpu/zero/zeroInterpreter_zero.cpp:435` because it looks like it takes the address of `env` above in a block and then leaves the block, leaving the address of `env` undefined. The second is related to Atomics `unsigned int Atomic::PlatformLoad<4ul>::operator()<unsigned int>(unsigned int const volatile*) const src/hotspot/share/runtime/atomic.hpp:432` because Zero performs a 4-byte load for a variable with 1-byte storage.
I am not super interested in fixing Zero, though these issues should definitely be reported and fixed. They are all undefined behavior and likely corruption in the first case. Shall I report them and proceed with integration?
-------------
PR: https://git.openjdk.org/jdk/pull/12477
More information about the hotspot-runtime-dev
mailing list