RFR: 8271869: AArch64: build errors with GCC11 in frame::saved_oop_result

Andrew Haley aph-open at littlepinkcloud.com
Thu Aug 5 14:40:44 UTC 2021


On 8/5/21 3:21 PM, Alan Hayward wrote:
> GCC11 warns that r0 is null. It does not complain if r1 is used instead.
> 
> AIUI, it is undefined behaviour in C++ to call member functions without
> a valid this pointer. So, technically GCC is correct to warn.

Correct. I have a prototype patch to fix this, but the same undefined
behaviour recurs several times in the code base, not just Assembler.
I think we should fix it properly, but there is some small size  and
space penalty for making the Registers etc valid pointers.

I will approve this now if you really need it, but I wonder if
this should be the spur to actually fixing the bug, not disabling
the warning.

Andrew.

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-dev mailing list