[glibc/release/2.42/master] hppa: Fix missing call to __feraiseexcept (BZ 34306)

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

commit 0be5a6a72a4a3132bc211720d2b6949a84f54dc3
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 46b83cc7a0..a3d3de33e4 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;
 }