public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/29488] New: test-ibm128-llround fails on ppc64el when built with gcc-12 and -O2 or higher
@ 2022-08-15  1:31 michael.hudson at canonical dot com
  2022-08-15  1:31 ` [Bug math/29488] " michael.hudson at canonical dot com
  2022-10-24 18:49 ` aurelien at aurel32 dot net
  0 siblings, 2 replies; 3+ messages in thread
From: michael.hudson at canonical dot com @ 2022-08-15  1:31 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29488

            Bug ID: 29488
           Summary: test-ibm128-llround fails on ppc64el when built with
                    gcc-12 and -O2 or higher
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: michael.hudson at canonical dot com
  Target Milestone: ---

root@kinetic:~/build# ./elf/ld.so --library-path .:math
./math/test-ibm128-llround
testing long double (without inline functions)
Failure: llround (0x7fffffffffffffff.8p0): Exception "Invalid operation" not
set
Failure: llround_downward (0x7fffffffffffffff.8p0): Exception "Invalid
operation" not set
Failure: llround_towardzero (0x7fffffffffffffff.8p0): Exception "Invalid
operation" not set
Failure: llround_upward (0x7fffffffffffffff.8p0): Exception "Invalid operation"
not set

Test suite completed:
  1156 test cases plus 656 tests for exception flags and
    656 tests for errno executed.
  4 errors occurred.

Recompiling math/s_llroundl.os with gcc-11 or with gcc-12 -O1 is enough to fix
this. Looking at the disassembly though I'm completely confused, feraiseexcept
(FE_INVALID); is still getting called in the failing case and the code that
runs after that looks the same (I've spent far too long trying to debug this).
I've uploaded the .o files to https://people.canonical.com/~mwh/good.o and
https://people.canonical.com/~mwh/bad.o -- good luck to the next person!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug math/29488] test-ibm128-llround fails on ppc64el when built with gcc-12 and -O2 or higher
  2022-08-15  1:31 [Bug math/29488] New: test-ibm128-llround fails on ppc64el when built with gcc-12 and -O2 or higher michael.hudson at canonical dot com
@ 2022-08-15  1:31 ` michael.hudson at canonical dot com
  2022-10-24 18:49 ` aurelien at aurel32 dot net
  1 sibling, 0 replies; 3+ messages in thread
From: michael.hudson at canonical dot com @ 2022-08-15  1:31 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29488

Michael Hudson-Doyle <michael.hudson at canonical dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.hudson at canonical dot co
                   |                            |m

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug math/29488] test-ibm128-llround fails on ppc64el when built with gcc-12 and -O2 or higher
  2022-08-15  1:31 [Bug math/29488] New: test-ibm128-llround fails on ppc64el when built with gcc-12 and -O2 or higher michael.hudson at canonical dot com
  2022-08-15  1:31 ` [Bug math/29488] " michael.hudson at canonical dot com
@ 2022-10-24 18:49 ` aurelien at aurel32 dot net
  1 sibling, 0 replies; 3+ messages in thread
From: aurelien at aurel32 dot net @ 2022-10-24 18:49 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29488

Aurelien Jarno <aurelien at aurel32 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
            Version|2.36                        |2.37
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |aurelien at aurel32 dot net

--- Comment #6 from Aurelien Jarno <aurelien at aurel32 dot net> ---
Fixed in 2.37 by the following commit:

commit 2b5478569e72ee4820a6e163d306690c9c0eaf5e
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Mon Oct 10 00:39:33 2022 +0200

    Avoid undefined behaviour in ibm128 implementation of llroundl (BZ #29488)

    Detecting an overflow edge case depended on signed overflow of a long
    long. Replace the additions and the overflow checks by
    __builtin_add_overflow().

    Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2022-10-24 18:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15  1:31 [Bug math/29488] New: test-ibm128-llround fails on ppc64el when built with gcc-12 and -O2 or higher michael.hudson at canonical dot com
2022-08-15  1:31 ` [Bug math/29488] " michael.hudson at canonical dot com
2022-10-24 18:49 ` aurelien at aurel32 dot net

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).