potential AArch64 ABI bug wrt handling of 128-bit bit-fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After upgrading to Ubuntu 20.04 LTS, GCC 9.3 displays a lot of notes:
hw/block/
hw/block/
663 | static MemTxResult pflash_
| ^~~~~~~
hw/block/
hw/block/
677 | static MemTxResult pflash_
| ^~~~~~~
hw/nvram/fw_cfg.c: In function ‘fw_cfg_
hw/nvram/
475 | static bool fw_cfg_
| ^~~~~~~
hw/nvram/fw_cfg.c: In function ‘fw_cfg_
hw/nvram/
483 | static bool fw_cfg_
| ^~~~~~~
hw/nvram/fw_cfg.c: In function ‘fw_cfg_
hw/nvram/
501 | static bool fw_cfg_
| ^~~~~~~
hw/nvram/fw_cfg.c: In function ‘fw_cfg_
hw/nvram/
521 | static bool fw_cfg_
| ^~~~~~~~~~~~~~~~~
hw/intc/arm_gic.c: In function ‘gic_do_hyp_read’:
hw/intc/
1996 | static MemTxResult gic_do_
| ^~~~~~~~~~~~~~~
hw/intc/arm_gic.c: In function ‘gic_thiscpu_
hw/intc/
1979 | static MemTxResult gic_thiscpu_
| ^~~~~~~
hw/intc/arm_gic.c: In function ‘gic_get_
hw/intc/
419 | static uint16_t gic_get_
| ^~~~~~~
This seems related to:
https:/
https:/
This is pretty unlikely in real code, but similar to Arm, the AArch64
ABI has a bug with the handling of 128-bit bit-fields, where if the
bit-field dominates the overall alignment the back-end code may end up
passing the argument correctly. This is a regression that started in
gcc-6 when the ABI support code was updated to support overaligned
types. The fix is very similar in concept to the Arm fix. 128-bit
bit-fields are fortunately extremely rare, so I'd be very surprised if
anyone has been bitten by this.
Changed in qemu: | |
status: | Fix Committed → Fix Released |
The warnings aren't a problem for QEMU because we don't expose these functions as public ABI, so the whole compile will be consistently built with the same compiler version. So we added -Wno-psabi in commit bac8d222a19f4a30d to silence the compiler here.