-
Bug
-
Resolution: Duplicate
-
P4
-
14
UnifiedOop may attempt to construct oop* values that are misaligned. That has unspecified behavior. Any further manipulation of the value (such as attempting to convert back to a narrowOop*) can't remove that. And dereferencing a pointer with unspecified value is undefined behavior.
It is generally a bad idea to lie to the type system the way this class is doing. An alternative would be to have a distinct type that carried around the internal (tagged) pointer as a void* or the like. Make it a thin, trivially copyable class, and there's no additional overhead.
It is generally a bad idea to lie to the type system the way this class is doing. An alternative would be to have a distinct type that carried around the internal (tagged) pointer as a void* or the like. Make it a thin, trivially copyable class, and there's no additional overhead.
- duplicates
-
JDK-8235174 ZGC: Add support for JFR leak profiler
-
- Resolved
-
- relates to
-
JDK-8230729 UnifiedOop uses wrong Access barriers
-
- Closed
-
-
JDK-8229437 assert(is_aligned(ref, HeapWordSize)) failed: invariant
-
- Closed
-
-
JDK-8230520 Incorrect UnifiedOop::is_narrow assertions
-
- Closed
-