[Bug target/93934] Unnecessary fld of uninitialized float stack variable results in ub of valid C++ code

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 14 07:21:58 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93934

--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
It might help to provide a option or tunable to disable the use of fcmov which
should reduce the attack surface a bit.  I don't see any way to avoid using
fld for loading x87 float or double values (well, load into GPR, do softfp
convert to long double, spill and fld as long double ...).

For the reporter using -fno-if-conversion should also reliably avoid the
situation in the testcase.


More information about the Gcc-bugs mailing list