RFR: JDK-8294902: Undefined Behavior in C2 regalloc with null references [v6]

Andrew Haley aph at openjdk.org
Mon Dec 5 11:33:42 UTC 2022


On Mon, 5 Dec 2022 09:38:45 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> How does this behave with respect to alignment? The previous implementation used 16 which is at least aligned to `std::max_align_t` (for all hotspots build systems?) My understanding is that `char space[sizeof (klass)];` is 1-byte aligned, so `dummyObj` may be misaligned.

That's an interesting point. I don't propose to trawl the standard for exact wording, but as far as I recall it's _accesses_ to misaligned members that are problematic.

-------------

PR: https://git.openjdk.org/jdk/pull/10920


More information about the hotspot-dev mailing list