This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug string/24024] strerror() might set errno to ENOMEM due to -fno-math-error
- From: "zackw at panix dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 22 Dec 2018 19:13:15 +0000
- Subject: [Bug string/24024] strerror() might set errno to ENOMEM due to -fno-math-error
- Auto-submitted: auto-generated
- References: <bug-24024-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=24024
Zack Weinberg <zackw at panix dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |zackw at panix dot com
--- Comment #2 from Zack Weinberg <zackw at panix dot com> ---
This seems like it might be a bug in GCC.
__set_errno expands to a normal assignment to errno, and within glibc errno is
treated as a normal __thread variable (not (*(__errno_location())), so it looks
to me like GCC must be assuming that malloc cannot set errno, which does not
seem like an appropriate consequence of -fno-math-errno.
Have you brought this up on the GCC mailing lists and/or bug tracker?
--
You are receiving this mail because:
You are on the CC list for the bug.