public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* Upstream glibc has a bug in math/e_exp10l.c
@ 2024-01-29 10:38 Ilya Kurdyukov
  2024-01-29 17:16 ` Adhemerval Zanella Netto
  0 siblings, 1 reply; 5+ messages in thread
From: Ilya Kurdyukov @ 2024-01-29 10:38 UTC (permalink / raw)
  To: glibc-bugs, Wilco Dijkstra, Adhemerval Zanella

Wilco Dijkstra made a typo in this patch:

Add libm_alias_finite for _finite symbols

author    Wilco Dijkstra <Wilco.Dijkstra@arm.com>
     Tue, 16 Jul 2019 15:17:22 +0000 (12:17 -0300)
committer    Adhemerval Zanella <adhemerval.zanella@linaro.org>
     Fri, 3 Jan 2020 13:02:04 +0000 (10:02 -0300)

https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=220622dde5704c95a100c2792a280f18f3deba73

Here in math/e_exp10l.c, the name "exp10l" must be used, but this line 
is copied from math/e_exp10.c and not changed:

   34 libm_alias_finite (__ieee754_exp10, __exp10)

https://sourceware.org/git/?p=glibc.git;a=blob;f=math/e_exp10l.c;h=b33d6fea239ebc20caf8b2dec9b7d03909a0fc81;hb=220622dde5704c95a100c2792a280f18f3deba73#l34



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Upstream glibc has a bug in math/e_exp10l.c
  2024-01-29 10:38 Upstream glibc has a bug in math/e_exp10l.c Ilya Kurdyukov
@ 2024-01-29 17:16 ` Adhemerval Zanella Netto
  2024-01-29 17:32   ` Ilya Kurdyukov
  2024-01-29 21:21   ` Joseph Myers
  0 siblings, 2 replies; 5+ messages in thread
From: Adhemerval Zanella Netto @ 2024-01-29 17:16 UTC (permalink / raw)
  To: Ilya Kurdyukov, glibc-bugs, Wilco Dijkstra



On 29/01/24 07:38, Ilya Kurdyukov wrote:
> Wilco Dijkstra made a typo in this patch:
> 
> Add libm_alias_finite for _finite symbols
> 
> author    Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>     Tue, 16 Jul 2019 15:17:22 +0000 (12:17 -0300)
> committer    Adhemerval Zanella <adhemerval.zanella@linaro.org>
>     Fri, 3 Jan 2020 13:02:04 +0000 (10:02 -0300)
> 
> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=220622dde5704c95a100c2792a280f18f3deba73
> 
> Here in math/e_exp10l.c, the name "exp10l" must be used, but this line is copied from math/e_exp10.c and not changed:
> 
>   34 libm_alias_finite (__ieee754_exp10, __exp10)
> 
> https://sourceware.org/git/?p=glibc.git;a=blob;f=math/e_exp10l.c;h=b33d6fea239ebc20caf8b2dec9b7d03909a0fc81;hb=220622dde5704c95a100c2792a280f18f3deba73#l34

It is indeed wrong, although it is not used by any ABI which defines
a long double different than double.  Either the sysdep version
(ieee754/ldbl-128ibm, ieee754/ldbl-128) or an arch specific one
(m68k, x86).

If/once an ABI uses this generic version, it would most likely
generic either an build error (due wrong aliases) or an ABI
issue.  Maybe a better option would just to remove this file.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Upstream glibc has a bug in math/e_exp10l.c
  2024-01-29 17:16 ` Adhemerval Zanella Netto
@ 2024-01-29 17:32   ` Ilya Kurdyukov
  2024-01-29 20:28     ` Adhemerval Zanella Netto
  2024-01-29 21:21   ` Joseph Myers
  1 sibling, 1 reply; 5+ messages in thread
From: Ilya Kurdyukov @ 2024-01-29 17:32 UTC (permalink / raw)
  To: Adhemerval Zanella Netto, glibc-bugs, Wilco Dijkstra


On 1/30/24 00:16, Adhemerval Zanella Netto wrote:
> On 29/01/24 07:38, Ilya Kurdyukov wrote:
>> Wilco Dijkstra made a typo in this patch:
>>
>> Add libm_alias_finite for _finite symbols
>>
>> author    Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>>      Tue, 16 Jul 2019 15:17:22 +0000 (12:17 -0300)
>> committer    Adhemerval Zanella <adhemerval.zanella@linaro.org>
>>      Fri, 3 Jan 2020 13:02:04 +0000 (10:02 -0300)
>>
>> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=220622dde5704c95a100c2792a280f18f3deba73
>>
>> Here in math/e_exp10l.c, the name "exp10l" must be used, but this line is copied from math/e_exp10.c and not changed:
>>
>>    34 libm_alias_finite (__ieee754_exp10, __exp10)
>>
>> https://sourceware.org/git/?p=glibc.git;a=blob;f=math/e_exp10l.c;h=b33d6fea239ebc20caf8b2dec9b7d03909a0fc81;hb=220622dde5704c95a100c2792a280f18f3deba73#l34
> It is indeed wrong, although it is not used by any ABI which defines
> a long double different than double.  Either the sysdep version
> (ieee754/ldbl-128ibm, ieee754/ldbl-128) or an arch specific one
> (m68k, x86).

It is used in patches for the e2karchitecture.

> If/once an ABI uses this generic version, it would most likely
> generic either an build error (due wrong aliases) or an ABI
> issue.  Maybe a better option would just to remove this file.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Upstream glibc has a bug in math/e_exp10l.c
  2024-01-29 17:32   ` Ilya Kurdyukov
@ 2024-01-29 20:28     ` Adhemerval Zanella Netto
  0 siblings, 0 replies; 5+ messages in thread
From: Adhemerval Zanella Netto @ 2024-01-29 20:28 UTC (permalink / raw)
  To: Ilya Kurdyukov, glibc-bugs, Wilco Dijkstra



On 29/01/24 14:32, Ilya Kurdyukov wrote:
> 
> On 1/30/24 00:16, Adhemerval Zanella Netto wrote:
>> On 29/01/24 07:38, Ilya Kurdyukov wrote:
>>> Wilco Dijkstra made a typo in this patch:
>>>
>>> Add libm_alias_finite for _finite symbols
>>>
>>> author    Wilco Dijkstra <Wilco.Dijkstra@arm.com>
>>>      Tue, 16 Jul 2019 15:17:22 +0000 (12:17 -0300)
>>> committer    Adhemerval Zanella <adhemerval.zanella@linaro.org>
>>>      Fri, 3 Jan 2020 13:02:04 +0000 (10:02 -0300)
>>>
>>> https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=220622dde5704c95a100c2792a280f18f3deba73
>>>
>>> Here in math/e_exp10l.c, the name "exp10l" must be used, but this line is copied from math/e_exp10.c and not changed:
>>>
>>>    34 libm_alias_finite (__ieee754_exp10, __exp10)
>>>
>>> https://sourceware.org/git/?p=glibc.git;a=blob;f=math/e_exp10l.c;h=b33d6fea239ebc20caf8b2dec9b7d03909a0fc81;hb=220622dde5704c95a100c2792a280f18f3deba73#l34
>> It is indeed wrong, although it is not used by any ABI which defines
>> a long double different than double.  Either the sysdep version
>> (ieee754/ldbl-128ibm, ieee754/ldbl-128) or an arch specific one
>> (m68k, x86).
> 
> It is used in patches for the e2karchitecture.

Right, but which long double ABI e2karchitecture uses? Is this using
ldbl-96 with a format similar to x86?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Upstream glibc has a bug in math/e_exp10l.c
  2024-01-29 17:16 ` Adhemerval Zanella Netto
  2024-01-29 17:32   ` Ilya Kurdyukov
@ 2024-01-29 21:21   ` Joseph Myers
  1 sibling, 0 replies; 5+ messages in thread
From: Joseph Myers @ 2024-01-29 21:21 UTC (permalink / raw)
  To: Adhemerval Zanella Netto; +Cc: Ilya Kurdyukov, glibc-bugs, Wilco Dijkstra

[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]

On Mon, 29 Jan 2024, Adhemerval Zanella Netto via Glibc-bugs wrote:

> > Here in math/e_exp10l.c, the name "exp10l" must be used, but this line is copied from math/e_exp10.c and not changed:
> > 
> >   34 libm_alias_finite (__ieee754_exp10, __exp10)
> > 
> > https://sourceware.org/git/?p=glibc.git;a=blob;f=math/e_exp10l.c;h=b33d6fea239ebc20caf8b2dec9b7d03909a0fc81;hb=220622dde5704c95a100c2792a280f18f3deba73#l34
> 
> It is indeed wrong, although it is not used by any ABI which defines
> a long double different than double.  Either the sysdep version
> (ieee754/ldbl-128ibm, ieee754/ldbl-128) or an arch specific one
> (m68k, x86).
> 
> If/once an ABI uses this generic version, it would most likely
> generic either an build error (due wrong aliases) or an ABI
> issue.  Maybe a better option would just to remove this file.

I agree with the idea of removing all the math/ implementations that are 
bogus (don't implement the appropriate semantics with an reasonable 
accuracy) and overridden for all supported floating-point formats / 
targets.  That includes at least: e_exp10.c e_exp10l.c s_fma.c s_fmaf.c 
s_fmal.c.

-- 
Joseph S. Myers
josmyers@redhat.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-29 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 10:38 Upstream glibc has a bug in math/e_exp10l.c Ilya Kurdyukov
2024-01-29 17:16 ` Adhemerval Zanella Netto
2024-01-29 17:32   ` Ilya Kurdyukov
2024-01-29 20:28     ` Adhemerval Zanella Netto
2024-01-29 21:21   ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).