[Bug math/22702] New: [powerpc-nofpu] nearbyintl traps with trapping "inexact"

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug math/22702] New: [powerpc-nofpu] nearbyintl traps with trapping "inexact"

tromey at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22702

            Bug ID: 22702
           Summary: [powerpc-nofpu] nearbyintl traps with trapping
                    "inexact"
           Product: glibc
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
              Host: powerpc*-*-*

For soft-float powerpc, the math/test-nearbyint-except-2 test fails because
nearbyintl traps when traps on "inexact" are enabled on entry (and an "inexact"
exception is generated internally, though cleared for the final return).

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22702] [powerpc-nofpu] nearbyintl traps with trapping "inexact"

tromey at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22702

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  da09e6fa2f8194fbdd82281195145aec195144dc (commit)
      from  08c6e95234c60a5c2f37532d1111acf084f39345 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=da09e6fa2f8194fbdd82281195145aec195144dc

commit da09e6fa2f8194fbdd82281195145aec195144dc
Author: Joseph Myers <[hidden email]>
Date:   Thu Jan 11 18:18:46 2018 +0000

    Make default libc_feholdsetround_noex_ctx use __feholdexcept (bug 22702).

    For soft-float powerpc, the math/test-nearbyint-except-2 test fails
    because nearbyintl traps when traps on "inexact" are enabled on entry
    (and an "inexact" exception is generated internally, though cleared
    for the final return).

    The problem is the default implementation of
    libc_feholdsetround_noex_ctx, which does not disable exception traps.
    There is some ambiguity about whether the *noex* interfaces are
    required to do so or only permitted to do so.  But given that we
    support fe* interfaces to enable and disable traps (on architectures
    with that functionality), functions that must not raise an exception
    (must not leave the flag set on exit if not set on entry) should also
    not trap on it when traps on that exception are enabled.  So it is
    appropriate to define these interfaces to have the feholdexcept effect
    of disabling exception traps; this patch updates the default
    implementation and comments accordingly.

    At least some architecture versions already disable traps; there are
    few uses of the *noex* interfaces at all, and while it's possible
    there are bugs on any architecture versions failing to disable traps
    that appear in the exp2 and remainder implementations, there are
    currently no tests, other than this one for nearbyintl (where only the
    ldbl-128ibm implementation uses SET_RESTORE_ROUND_NOEX), that would
    fail as a result of such a bug.  (Hard-float powerpc does disable
    traps here, hence the nearbyintl failure not appearing there.)

    Tested for powerpc (soft-float).  This brings that configuration to
    clean math/ test results, provided you build with GCC 8 to get the fix
    for GCC bug 64811.

        [BZ #22702]
        * sysdeps/generic/math_private.h (libc_feresetround_noex): Update
        comment to say exceptions are discarded.
        (libc_feholdsetround_noex_ctx): Use __feholdexcept instead of
        __fegetenv.
        (SET_RESTORE_ROUND_NOEX): Update comment to say non-stop mode must
        be enabled.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |   10 ++++++++++
 sysdeps/generic/math_private.h |    9 +++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22702] [powerpc-nofpu] nearbyintl traps with trapping "inexact"

tromey at sourceware dot org
In reply to this post by tromey at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22702

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.27

--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
Fixed for 2.27.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22702] [powerpc-nofpu] nearbyintl traps with trapping "inexact"

tromey at sourceware dot org
In reply to this post by tromey at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22702

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  c8924f1ff22cb78abc9bb950c3b23d8483ac7bba (commit)
      from  da09e6fa2f8194fbdd82281195145aec195144dc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c8924f1ff22cb78abc9bb950c3b23d8483ac7bba

commit c8924f1ff22cb78abc9bb950c3b23d8483ac7bba
Author: Joseph Myers <[hidden email]>
Date:   Fri Jan 12 00:12:57 2018 +0000

    Fix s390 linknamespace fallout of bug 22702 patch.

    My fix for bug 22702 introduced linknamespace test failures on
    s390x-linux-gnu and s390-linux-gnu because it made remainder call
    __feholdexcept, and the s390 __feholdexcept calls fegetenv, and
    remainder is in Unix98 and XPG4.2 but fegetenv isn't.  This patch
    makes __feholdexcept call __fegetenv instead to avoid that namespace
    issue.

    Tested (compilation) with build-many-glibcs.py for s390x-linux-gnu,
    where it resolves the test failures.

        * sysdeps/s390/fpu/feholdexcpt.c (__feholdexcept): Call __fegetenv
        instead of fegetenv.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    5 +++++
 sysdeps/s390/fpu/feholdexcpt.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug math/22702] [powerpc-nofpu] nearbyintl traps with trapping "inexact"

tromey at sourceware dot org
In reply to this post by tromey at sourceware dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=22702

Jeremi <jeremip11 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeremip11 at gmail dot com

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