This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/18111] hppa: fesetexceptflag, and feupdateenv not correctly setting new flag.
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 11 Mar 2015 06:15:17 +0000
- Subject: [Bug math/18111] hppa: fesetexceptflag, and feupdateenv not correctly setting new flag.
- Auto-submitted: auto-generated
- References: <bug-18111-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18111
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|hppa: fesetexceptflag not |hppa: fesetexceptflag, and
|correctly setting new flag. |feupdateenv not correctly
| |setting new flag.
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
In addition feupdateenv is also broken in that it doesn't handle FE_DEFAULT_ENV
and FE_NOMASK_ENV, crashing on either.
It should do:
+ /* Given environment with exception flags not cleared. */
+ if ((envp != FE_DFL_ENV) && (envp != FE_NOMASK_ENV))
+ {
+ memcpy(&temp, envp, sizeof(fenv_t));
+ temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27);
+ }
+
+ /* Default environment with exception flags not cleared. */
+ if (envp == FE_DFL_ENV)
+ temp.__status_word = s.sw[0] & (FE_ALL_EXCEPT << 27);
+
+ /* All traps enabled and current exception flags not cleared. */
+ if (envp == FE_NOMASK_ENV)
+ temp.__status_word = (s.sw[0] & (FE_ALL_EXCEPT << 27)) | FE_ALL_EXECPT;
--
You are receiving this mail because:
You are on the CC list for the bug.