Skip to content

[ARM / Bug Fix] Disabled "inline" on "fpc_ansistr_decr_ref" and "fpc_ansistr_incr_ref" for now

J. Gareth "Kit" Moreton requested to merge CuriousKit/optimisations:main into main

Summary

This merge request temporarily disables the inline directive on fpc_ansistr_decr_ref and fpc_ansistr_incr_ref so arm-linux may build again. The latter having inline isn't known to trigger the bug, but it is part of a pair.

System

  • Operating system: Linux (Raspberry Pi OS) and maybe others
  • Processor architecture: ARM
  • Device: Raspberry Pi (and others)

What is the current bug behavior?

arm-linux is broken due to an old compiler bug that is triggered by fpc_ansistr_decr_ref and prevents building.

What is the behavior after applying this patch?

arm-linux should build again.

Additional Notes

This doesn't actually fix the compiler bug - that is still a work in progress. It seems to be related to the fact that while fpc_ansistr_decr_ref is given the inline directive in the interface section, its actual implementation under ARM is a pure assembly function, and a combination of factors leads to a dangling pointer to be generated somewhere: most likely in a regset-type operand.

When this bug is resolved, the inline directive may be returned, or left as disabled under ARM due to the fact that its implementation is a pure assembly routine on that platform.

Merge request reports