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:
emaste 2008-08-13 17:32:48 +00:00
parent 3c198486dc
commit b30356b634

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)