1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 11:50:51 -08:00

Check alignment of address given to poolfree.

Copied from Perforce
 Change: 187265
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-10-14 16:54:10 +01:00
parent 9fff9289af
commit 7db46bbb3f
2 changed files with 3 additions and 2 deletions

View file

@ -321,6 +321,7 @@ void PoolFree(Pool pool, Addr old, Size size)
AVER(old != NULL);
/* The pool methods should check that old is in pool. */
AVER(size > 0);
AVER(AddrIsAligned(old, pool->alignment));
AVER(PoolHasRange(pool, old, AddrAdd(old, size)));
(*pool->class->free)(pool, old, size);