Re: standard error handling for malloc() broken for user root and group wheel
From: Tim Kientzle (tim_at_kientzle.com)
Date: 02/19/04
- Previous message: Andre Guibert de Bruet: "Re: Review/Test: Pseudo-device unit number management patch"
- In reply to: Bruce Evans: "Re: standard error handling for malloc() broken for user root and group wheel"
- Next in thread: Poul-Henning Kamp: "Re: standard error handling for malloc() broken for user root and group wheel"
- Reply: Poul-Henning Kamp: "Re: standard error handling for malloc() broken for user root and group wheel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 19 Feb 2004 00:13:00 -0800 To: Bruce Evans <bde@zeta.org.au>
On Wed, 18 Feb 2004, Poul-Henning Kamp wrote:
>
>The situations which can result in the 'a' vs 'A' flag making a
>difference in malloc(3) behavior are all violations of the malloc(3)
>API as defined by ISO C and as such the standard defines the behaviour
>as "undefined".
ANSI/ISO 9899-1990, Section 7.10.3.3 clearly states:
"The malloc function returns either a null pointer
or a pointer to the allocated space."
There are no "undefined" possibilities here. Aborting the program
on a failure to allocate memory is pretty clearly a violation
of the standard, which requires the malloc function to
always return.
Tim Kientzle
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
- Previous message: Andre Guibert de Bruet: "Re: Review/Test: Pseudo-device unit number management patch"
- In reply to: Bruce Evans: "Re: standard error handling for malloc() broken for user root and group wheel"
- Next in thread: Poul-Henning Kamp: "Re: standard error handling for malloc() broken for user root and group wheel"
- Reply: Poul-Henning Kamp: "Re: standard error handling for malloc() broken for user root and group wheel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|