Bug 17924 - 'free' should not set errno
Summary: 'free' should not set errno
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: malloc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 22157 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-04 00:06 UTC by Paul Eggert
Modified: 2018-05-14 18:07 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggert 2015-02-04 00:06:46 UTC
As mentioned in <http://austingroupbugs.net/view.php?id=385>, the next major POSIX release will require 'free' to not set errno.  Rich Felker points out some scenarios when glibc 'free' might set errno; see <https://sourceware.org/ml/libc-alpha/2015-02/msg00067.html>.  These scenarios should be investigated and fixed.

Also, the glibc documentation should be updated to make it clear to users that glibc 'free' does not set errno, and that any replacements for 'free' should do the same.
Comment 1 Florian Weimer 2017-09-19 21:02:12 UTC
*** Bug 22157 has been marked as a duplicate of this bug. ***