assembler_x86.cpp:11128:38: error: 'this' pointer is null

Andrew Haley aph-open at littlepinkcloud.com
Fri Jun 17 07:36:54 UTC 2022


On 6/16/22 19:00, Browser wrote:
 > That one I'll chalk up to not-yet-resolved issue with GCC 12. Mainline does not seem to fail GCC 12
 > the same way, but it does fail too.

 > shade at redhat.com:

 >> Pleasing the newer compiler version is always something in
 >> progress. Meanwhile, as usual, configuring with
 >> --disable-warnings-as-errors helps to demote these warnings to just
 >> warnings.

This is the Undefined Behaviour bug that I fixed for AArch64 in
8276563, Undefined Behaviour in class Assembler. Compilers get
smarter, and IMO this is an evil hack from decades ago that we should
fix.

The problem is that all instances of type Register exhibit UB in the
form of wild pointer (including null pointer) dereferences. It isn't
very hard to fix: we should make Registers pointers to something
rather than aliases of small integers.

I'd like to apply the same fix to x86, so we never hear of this bug
again. What do you think?

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://urldefense.com/v3/__https://www.redhat.com__;!!ACWV5N9M2RV99hQ!OtbRk3IjtkZWG0t0Bpsa66EfBsaQMGoFlzSIyRDF9W1_eN7GogdN6wA4buYUnsub7-H2sS_NCqzQlBGmP6sZrrD86Wq7$ >
https://urldefense.com/v3/__https://keybase.io/andrewhaley__;!!ACWV5N9M2RV99hQ!OtbRk3IjtkZWG0t0Bpsa66EfBsaQMGoFlzSIyRDF9W1_eN7GogdN6wA4buYUnsub7-H2sS_NCqzQlBGmP6sZrnHbC_Pi$ 
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the build-dev mailing list