[PATCH] x86-64: Fix a typo in fesetenv.c [BZ #33619]

Adhemerval Zanella adhemerval.zanella@linaro.org
Tue Nov 11 09:07:44 GMT 2025


Thanks for catching this, I did not see it with -fstack-protector=all for some reason.

> Em 11 de nov. de 2025, à(s) 05:01, Collin Funk <collin.funk1@gmail.com> escreveu:
> 
> "H.J. Lu" <hjl.tools@gmail.com> writes:
> 
>>> On Tue, Nov 11, 2025 at 2:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>>> 
>>> On Tue, Nov 11, 2025 at 2:12 PM Collin Funk <collin.funk1@gmail.com> wrote:
>>>> 
>>>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>>> 
>>>>>> I bisected 65 test failures to this commit. On a x86_64 Fedora 43 system
>>>>>> with the following gcc:
>>>>>> 
>>>>>>    $ gcc --version | head -n 1
>>>>>>    gcc (GCC) 15.2.1 20251022 (Red Hat 15.2.1-3)
>>>>>> 
>>>>>> The main ones are:
>>>>>> 
>>>>>>    FAIL: math/test-fenv
>>>>>>    FAIL: math/test-fenv-clear
>>>>>>    FAIL: math/test-fenv-clear-sse
>>>>>>    FAIL: math/test-fenv-return
>>>>>>    FAIL: math/test-fenv-x87
>>>>> 
>>>>> How can I reproduce these on Fedora 43?
>>>> 
>>>> Here is what I did:
>>>> 
>>>>    $ "$GLIBC_SRCDIR"/configure --prefix=/usr \
>>>>        && make -j $(nproc) \
>>>>        && make subdirs=math -j $(nproc) check
>>>> 
>>>> Collin
>>> 
>>> I opened:
>>> 
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=33619
>>> 
>> 
>> Fix a typo in
>> 
>> commit 427c25278d1dae62dffa07ea5cd0fc33f07190af
>> Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>> Date:   Fri Oct 31 17:00:46 2025 -0300
>> 
>>    x86: Adapt "%v" usage on clang to emit VEX enconding
>> 
>> @@ -103,8 +104,8 @@ __fesetenv (const fenv_t *envp)
>>       temp.__mxcsr = envp->__mxcsr;
>>     }
>> 
>> -  __asm__ ("fldenv %0\n"
>> -          "%vldmxcsr %1" : : "m" (temp), "m" (temp.__mxcsr));
>> +  asm volatile ("fldenv %0" : "=m" (temp));
>> +  ldmxcsr_inline_asm (&temp.__mxcsr);
>> 
>>   /* Success.  */
>>   return 0;
>> 
>> "temp" is input not output.  This fixes BZ #33619.
>> 
>> OK for master if there are no regressions?
> 
> Yep, that fixes it for me.
> 
> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
> 
> Good catch.
> 
> Collin


More information about the Libc-alpha mailing list