On Thu, 29 Jun 2006, Johannes Weiner wrote:

JW>On Thu, Jun 29, 2006 at 06:09:37PM +0200, Matthias Andree wrote:
JW>
JW>> The value returned from malloc(0) must not be dereferenced whatever it
JW>> was. It was 0x800, which doesn't count as "failure".
JW>
JW>But this would be appropriate for catching the error:
JW>
JW>if ((foo = malloc(0)) == foo)
JW>     /* make noise */
JW>
JW>wouldn't it?

Wouldn't it rather invoke undefined behaviour?

harti
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to