JDK-8224853 : CDS address sanitizer errors
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2019-05-28
  • Updated: 2021-07-05
  • Resolved: 2019-06-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14
11.0.13Fixed 13 b25Fixed 14Fixed
Related Reports
Relates :  
Description
Building with --enable-asan on AArch64 reports an error in java_lang_Class::serialize_offsets (see attachment).

The value `offsets_computed' is a bool which we cast to a u4* and pass to WriteClosure::do_u4. But sizeof(bool) is implementation defined and on AArch64 (and x86_64 also) it is only one byte. Currently this is harmless because offsets_computed is followed by three bytes of padding before an int, but if someone added another bool global variable immediately after offsets_computed we would get some very obscure bugs.
Comments
Fix Request (11u) This fixes a (benign so far) memory access bug, captured by ASAN. Patch does not apply cleanly due to context, 11u RFR reviewed by Jiangli.
05-07-2021

Yes, 11u AArch64/x86_64 fails the similar way. But since CDS is not constructed at build time, you just need to run the ASAN-enabled JDK with -XX:+DumpSharedSpaces.
02-07-2021

Same thing applies to 11u. I believe it was introduced by JDK-8194759.
20-01-2020

Review thread: https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-May/034619.html
31-05-2019

Sorry, should have been a "bug".
28-05-2019

[~ngasson] why is this a "task" rather than a bug?
28-05-2019