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

Kim Barrett kbarrett at openjdk.org
Mon Dec 12 18:27:31 UTC 2022


On Mon, 12 Dec 2022 18:03:35 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> src/hotspot/share/utilities/globalDefinitions_gcc.hpp line 151:
>> 
>>> 149: #define offset_of(klass,field)                          \
>>> 150: []() {                                                  \
>>> 151:   char space[sizeof (klass)] ATTRIBUTE_ALIGNED(16);     \
>> 
>> Is 16 over-aligned on 32bit platforms? Too bad https://git.openjdk.org/jdk/pull/11446 isn't approved yet, else you could use alignas(std::max_align_t). (I wouldn't object if you were forward-looking here, though can't speak for anyone else.)
>
> I'll leave it at 16. This is a bug fix, and I don't want it to have a dependency on [JDK-8297912](https://bugs.openjdk.org/browse/JDK-8297912), a P4 Enhancement.

OK.

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

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


More information about the hotspot-dev mailing list