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:
parent
9fff9289af
commit
7db46bbb3f
2 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue