1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-27 07:41:28 -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);

View file

@ -6,8 +6,8 @@ TEST_HEADER
link = testlib.o
OUTPUT_SPEC
assert = true
assertfile P= poolmfs.c
assertcond =
assertfile P= pool.c
assertcond = AddrIsAligned(old, pool->alignment)
END_HEADER
*/