zero-size malloc and ps: kvm_getprocs: Bad address

Joerg Sonnenberger joerg at britannica.bec.de
Sun May 24 07:15:58 PDT 2009


On Sun, May 24, 2009 at 10:26:24AM +0200, Simon 'corecode' Schubert wrote:
> I think we should make malloc(0) return a valid pointer.

For consistency, just round up malloc(0) to the minimal allocation size.
That avoids most problems with existing programs and keeps the spirit of
the standard.

Joerg





More information about the Bugs mailing list