This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug string/24024] strerror() might set errno to ENOMEM due to -fno-math-error


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]