[glibc] hppa: Fix missing call to __feraiseexcept (BZ 34306)

John David Anglin via Glibc-cvs <[email protected]> Tue, 23 Jun 2026 17:41:56 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f9deb2f50b59607abe6219c6edf9fe3488504b32

commit f9deb2f50b59607abe6219c6edf9fe3488504b32
Author: John David Anglin <[email protected]>
Date:   Tue Jun 23 13:41:10 2026 -0400

    hppa: Fix missing call to __feraiseexcept (BZ 34306)
    
    The feupdateenv function is supposed to raise exceptions after
    installing the environment represented by its envp argument.
    This was accidentally missed on hppa.
    
    The failure to raise exceptions was noticed by the failure of
    the math/test-narrowing-trap test.
    
    Signed-off-by: John David Anglin <[email protected]>

Diff:
---
 sysdeps/hppa/fpu/feupdateenv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
index 397ec7298c..4d7c7f5a37 100644
--- a/sysdeps/hppa/fpu/feupdateenv.c
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -24,6 +24,7 @@ __feupdateenv (const fenv_t *envp)
 {
   union { unsigned long long l; unsigned int sw[2]; } s;
   fenv_t temp;
+
   /* Get the current exception status */
   __asm__ ("fstd %%fr0,0(%1)	\n\t"
            "fldd 0(%1),%%fr0	\n\t"
@@ -46,6 +47,10 @@ __feupdateenv (const fenv_t *envp)
 
   /* Install new environment.  */
   __fesetenv (&temp);
+
+  /* Raise exceptions.  */
+  __feraiseexcept (temp.__status_word >> 27);
+
   /* Success.  */
   return 0;
 }