[PATCH] ARM: disable GCC SRA optimization
Nicolas Pitre
nicolas.pitre at linaro.org
Wed Sep 2 12:37:09 PDT 2015
On Wed, 2 Sep 2015, Ard Biesheuvel wrote:
> While working on the 32-bit ARM port of UEFI, I noticed a strange
> corruption in the kernel log.
[...]
> when called with len == 0, triggers an issue in the GCC SRA optimization
> pass (Scalar Replacement of Aggregates), which handles promotion of signed
> struct members incorrectly. This is a known but as yet unresolved issue.
> (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932). In this particular
> case, it is causing the second while loop to be executed erroneously a
> single time, causing the additional space characters to be printed.
>
> So disable the optimization by passing -fno-ipa-sra.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
Acked-by: Nicolas Pitre <nico at linaro.org>
> ---
>
> Needs to go to stable perhaps?
Absolutely. You encountered a kernel log strangeness, other people
reported kernel boot failures. Who knows what else this bug can do.
Would be a good idea if you subscribed yourself to the bug entry so to
put a test in the makefile for the fixed gcc version eventually.
Nicolas
More information about the linux-arm-kernel
mailing list