HomeFreeBSD

While convenient, avoid using alloca() for reasons specified in

Description

While convenient, avoid using alloca() for reasons specified in
the BUGS section of the alloca(3) manpage. In particular, when
the number of TCP sockets is several tens of thousand, trying to
"sysctl -a" would SIGSEGV on the net.inet.tcp.pcblist entry (it
would exceed the stacksize ulimit, in an undetectable manner).

Reported by: Igor Sysoev

Details

Provenance
Ruslan Ermilov <ru@FreeBSD.org>Authored on Sep 6 2006, 8:15 PM
Parents
rG14ca3cd6ffd6: MFp4: check the return value of malloc and report an error when invalid.
Branches
Unknown
Tags
Unknown

Event Timeline