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.
[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.
- caused by
-
JDK-8363986 Heap region in CDS archive is not at deterministic address
-
- Resolved
-
- relates to
-
JDK-8314258 checked_cast doesn't properly check some cases
-
- Open
-
- links to
-
Commit(master)
openjdk/jdk/70669d05
-
Review(master)
openjdk/jdk/29100