Fix REDZONE(9) on amd64 and perhaps other 64 bit targets -- ensure the space

that redzone adds to the allocation for storing its metadata is at least as
large as the metadata that it will store there.

Submitted by:	Nima Misaghian
This commit is contained in:
Ed Maste 2008-08-13 17:32:48 +00:00
parent bc136b187d
commit 4222358722
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181693

View File

@ -54,6 +54,8 @@ static u_long
redzone_roundup(u_long n)
{
if (n < REDZONE_HSIZE)
n = REDZONE_HSIZE;
if (n <= 128)
return (128);
else if (n <= 256)