Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2004 23:39:54 +0100
From:      Stefan Farfeleder <stefan@fafoe.narf.at>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        freebsd-standards@FreeBSD.ORG
Subject:   Re: standards/62858: malloc(0) not C99 compliant
Message-ID:  <20040302223950.GF1021@wombat.fafoe.narf.at>
In-Reply-To: <59773.1078159051@critter.freebsd.dk>
References:  <20040301160022.GA13617@VARK.homeunix.com> <59773.1078159051@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

> But lets turn this around, do you have evidence of code which breaks
> with the current behaviour ?

I think only conformance checking software will notice this.

> Does the code also fail if you give
> malloc the 'V' flag ?

No, modulo PR bin/62859 where I forgot to CC you :)

Cheers,
Stefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040302223950.GF1021>