[PATCH] tst-scanf-format-real: don't crash on nan()

Carlos O'Donell carlos@redhat.com
Thu Apr 10 17:25:09 GMT 2025


On 4/10/25 11:31 AM, Maciej W. Rozycki wrote:
> On Thu, 10 Apr 2025, Carlos O'Donell wrote:
> 
>>>> May you please post a v2 that accounts for this correctly to avoid this
>>>> becoming a problem in the future?
>>>
>>> It cannot.
>>>
>>
>> I understand that position. Particularly since the existing code suffers
>> no ill effects.
>>
>> Will you be posting a v2 with the requested changes?
> 
>   Can we please hold on with this yet?  This is a fix for an unhandled data
> input format, which doesn't affect any actual input present in our tests.

Yes certainly, I don't mind holding if you have a different change in mind
as author of the tests.

> As such, there's no need to rush with an update here; input data formats
> supported here are a subset of what ISO C has defined (although I agree
> code mustn't crash on rubbish input but instead handle it gracefully).

For testing code I'm more flexible. I think we can crash on rubbish, but
should not crash on related inputs as we extend the testsuite input to
cover the cases for m68k.

>   My understanding of the issue has been that on M68K "nan" and "nan()"
> produce different results as inputs to `strtod', etc.  I've got a fix in
> the queue and for that we'll need a corresponding update to handle "nan"
> and "nan()" reference input accordingly in the tests.  Naturally that'll
> require both to be handled correctly.

Sounds good to me!

-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list