From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10903 invoked by alias); 23 Feb 2015 12:19:08 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org Received: (qmail 10833 invoked by uid 55); 23 Feb 2015 12:19:05 -0000 From: "joseph at codesourcery dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/12547] realloc(p, 0) violates C99 Date: Mon, 23 Feb 2015 12:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.13 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00276.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=12547 --- Comment #11 from joseph at codesourcery dot com --- The proposed TC for DR#400 (closed, presumably to be published in C11 TC2) makes the standard say "If size is zero and memory for the new object is not allocated, it is implementation-defined whether the old object is deallocated. ... The realloc function returns a pointer to the new object (which may have the same value as a pointer to the old object), or a null pointer if the new object has not been allocated. ... Invoking realloc with a size argument equal to zero is an obsolescent feature.". Based on that conclusion about what realloc may do in this case, this sounds like INVALID to me. -- You are receiving this mail because: You are on the CC list for the bug.