[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bug #40535] realloc(xxx, 0) doesn't free
From: |
Joerg Wunsch |
Subject: |
[avr-libc-dev] [bug #40535] realloc(xxx, 0) doesn't free |
Date: |
Sun, 10 Nov 2013 12:55:45 +0000 |
User-agent: |
Mozilla/5.0 (X11; FreeBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36 |
Update of bug #40535 (project avr-libc):
Status: None => Need Info
Assigned to: None => joerg_wunsch
_______________________________________________________
Follow-up Comment #2:
> realloc(xxx, 0) is supposed to free the given memory block if xxx is not
NULL
Can you point me to a wording in the standard that would
require this? I can't seem to find something to that effect.
The rationale *allows* this to be one possible implementation,
but it's not mandated. Our implementation simply deallocates
as much as possible, and the returned object pointer is
consistent with a pointer to an object resulting out of
malloc(0).
I tend to dismiss the request since it bears the risk of
introducing new bugs, of course unless someone can prove the
existing implementation violates the C standard.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?40535>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/