[Bug malloc/12547] realloc(p, 0) violates C99

bruno at clisp dot org sourceware-bugzilla@sourceware.org
Sat Oct 19 22:11:26 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=12547

--- Comment #18 from Bruno Haible <bruno at clisp dot org> ---
Now that ISO C 23 specifies that realloc (p, 0) with p != NULL is undefined
behaviour, I have  pledged the gcc and clang sanitizer developers to catch this
case of undefined behaviour at runtime:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117233
https://github.com/llvm/llvm-project/issues/113065

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list