Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224853

CDS address sanitizer errors

XMLWordPrintable

    • b25
    • aarch64
    • linux

        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.

              ngasson Nick Gasson
              ngasson Nick Gasson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: