FYI: FAIL malloc/tst-malloc-too-large.c with gcc 11

Stefan Liebler stli@linux.ibm.com
Tue Dec 1 12:25:44 GMT 2020


On 11/30/20 5:40 PM, Stefan Liebler via Libc-alpha wrote:
> Hi,
> 
> just as information, if build with gcc 11, the testase
> malloc/tst-malloc-too-large.c is failing with:
> error: tst-malloc-too-large.c:97: not true: errno == ENOMEM
> error: tst-malloc-too-large.c:97: not true: errno == ENOMEM
> ...
> error: tst-malloc-too-large.c:97: not true: errno == ENOMEM
> error: 65533 test failures
> 
> I've just created gcc Bug 98070 - errno is not re-evaluated after
> clearing errno and calling realloc(ptr, SIZE_MAX):
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98070
> 
> Bye,
> Stefan
> 

The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:57fcbe579c2f2b0919486b658a5bec8f4e1ef42b

commit r11-5598-g57fcbe579c2f2b0919486b658a5bec8f4e1ef42b
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Dec 1 09:19:52 2020 +0100

    middle-end/98070 - fix realloc builtin fnspec

    realloc clobbers errno, note that.

    2020-12-01  Richard Biener  <rguenther@suse.de>

            PR middle-end/98070
            * builtins.c (builtin_fnspec): realloc is ".Cw ".

=> malloc/tst-malloc-too-large is now passing.


More information about the Libc-alpha mailing list