SVNews r327796

NOTE: This service is experimental and subject to change! Use at your own risk!

2018-01-10 21:49:45 - r327796 by cem (cem)

Complete list of files affected by revision r327796:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/share/man/man9/malloc.9  
  History   Contents   Diff   MODIFY   /head/sys/kern/kern_malloc.c  
  History   Contents   Diff   MODIFY   /head/sys/sys/malloc.h  

Commit message:

mallocarray(9): panic if the requested allocation would overflow

Additionally, move the overflow check logic out to WOULD_OVERFLOW() for
consumers to have a common means of testing for overflowing allocations.
WOULD_OVERFLOW() should be a secondary check -- on 64-bit platforms, just
because an allocation won't overflow size_t does not mean it is a sane size
to request. Callers should be imposing reasonable allocation limits far,
far, below overflow.

Discussed with: emaste, jhb, kp
Sponsored by: Dell EMC Isilon


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 8 ms, 3 files printed. Current time is 2018-03-19 12:42:22. All times are in UTC/GMT.