AOTMappedHeapWriter::relocate_field_in_buffer should use CompressedOops::narrow_oop_cast

XMLWordPrintable

    • master

      AOTMappedHeapWriter::relocate_field_in_buffer uses checked_cast to convert from a "request_referent" integral address value to a narrowOop. Using checked_cast here may conflict with changes to that function that are being considered as part of JDK-8314258.
      [Later] The problem is actually much worse than that. static_cast of an integral value to an enum type where the value isn't representable is UB. So checked_cast to an enum is just broken.

      The relocation should instead be using CompressedOops::narrow_oop_cast, which is purpose-built for the conversion being done there.

            Assignee:
            Kim Barrett
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: