bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: free-posix: New module, renamed from 'free'


From: Bruno Haible
Subject: Re: free-posix: New module, renamed from 'free'
Date: Sat, 19 Dec 2020 22:28:41 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote:
> Unfortunately the test fails on Ubuntu 20.10 (and I assume on other 
> GNU/Linux hosts).

And although the test fails, GCC makes optimizations that assume that
free() preserves errno. In particular, when you write

    int saved_errno = errno;
    free (ptr);
    errno = saved_errno;

GCC may transform this to just

    free (ptr);

Reported at <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396> .

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]