Bug 23292 - 64-bit long double functions are redirected twice when using finite symbols
Summary: 64-bit long double functions are redirected twice when using finite symbols
Status: ASSIGNED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.28
: P2 normal
Target Milestone: ---
Assignee: Tulio Magno Quites Machado Filho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-14 18:05 UTC by Tulio Magno Quites Machado Filho
Modified: 2018-06-15 05:29 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tulio Magno Quites Machado Filho 2018-06-14 18:05:15 UTC
Replace -mlong-double-128 with -mlong-double-64 in one of the long double finite tests, e.g. math/test-ldouble-finite-acos.

After preprocessing the following code will be generated:

...
extern long double acosl (long double __x) __asm__ ("" "acos") __attribute__ ((__nothrow__ , __leaf__));
...
extern long double acosl (long double) __asm__ ("" "__acos_finite") __attribute__ ((__nothrow__ , __leaf__));

The following code is compiled, recent GCC versions (tested with GCC 7 and 8) will generate the following warning/error:

./bits/math-finite.h:46:1: error: asm declaration ignored due to conflict with previous rename [-Werror=pragmas]
 __MATH_REDIRCALL (acos, , (_Mdouble_));
 ^~~~~~~~~~~~~~~~
./bits/math-finite.h:50:1: error: asm declaration ignored due to conflict with previous rename [-Werror=pragmas]
 __MATH_REDIRCALL (acosh, , (_Mdouble_));

This issue does not completely affect users because system headers are ignored for this particular warning.
Comment 1 Tulio Magno Quites Machado Filho 2018-06-14 18:06:25 UTC
I have proposed the following patch to fix this issue: https://patchwork.sourceware.org/patch/27684/

I'm reworking it.