tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: reallocarr(3)



On Feb 5,  2:18pm, Todd.Miller%courtesan.com@localhost ("Todd C. Miller") wrote:
-- Subject: Re: reallocarr(3)

| It returns a non-NULL pointer to an address that has no read or
| write permissions (so access via it will fault).  This is the same
| behavior as malloc(0) and calloc(n, 0) or calloc(0, n) on OpenBSD.
|
| Neither ISO C nor POSIX require that malloc(0) return a NULL pointer
| so there is really no ambiguity with reallocarrar() or calloc() on
| OpenBSD.

Exactly, it does not solve the problem with the ambiguity in the
standard. The return value still depends on the underlying malloc/realloc
implementation.

christos


Home | Main Index | Thread Index | Old Index