[PATCH] free: preserve errno [BZ#17924]

Siddhesh Poyarekar siddhesh@gotplt.org
Mon Dec 21 07:43:07 GMT 2020


On 12/21/20 12:50 PM, Paul Eggert wrote:
> From e4fec6f28270c9b0979f9fe8920dc52f8f7d70cd Mon Sep 17 00:00:00 2001
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sat, 19 Dec 2020 12:52:09 -0800
> Subject: [PATCH] free: preserve errno [BZ#17924]
> 
> In the next release of POSIX, free must preserve errno
> <https://www.austingroupbugs.net/view.php?id=385>.
> Modify __libc_free to save and restore errno, so that
> any internal munmap etc. syscalls do not disturb the caller's errno.
> Add a test malloc/tst-free-errno.c (almost all by Bruno Haible),
> and document that free preserves errno.

Thanks, this version looks good to me.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>


More information about the Libc-alpha mailing list