standards/62858: malloc(0) not C99 compliant
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Mar 2 15:50:18 PST 2004
In message <20040302223950.GF1021 at wombat.fafoe.narf.at>, Stefan Farfeleder writes:
>On Mon, Mar 01, 2004 at 05:37:31PM +0100, Poul-Henning Kamp wrote:
>
>> I want to make sure people who malloc(0) and then deref the pointer get
>> the core dump they need to debug their problem.
>
>So you want malloc(0) to return a different pointer to unmapped memory
>every time it is called?
Yes.
>> Does the code also fail if you give
>> malloc the 'V' flag ?
>
>No, modulo PR bin/62859 where I forgot to CC you :)
I'll look at this tomorrow if I have time.
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-standards
mailing list