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

Andrew Haley aph at openjdk.org
Mon Dec 12 18:06:11 UTC 2022


On Mon, 12 Dec 2022 15:41:27 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Reviewer feedback
>
> 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.

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

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


More information about the hotspot-dev mailing list