|Title||MPS LO pool: mps_arena_formatted_objects_walk fails with AVER(i < j)|
|Assigned user||Richard Kistruck|
|Description||MPS LO pool: mps_arena_formatted_objects_walk fails with AVER(i < j)|
The mps_arena_formatted_objects_walk() call enumerates objects in
all pools. If there is a pool of pool-class LO (leaf-only objects,
see mps_class_lo), the mps_arena_formatted_objects_walk() call will
fail with an assert.
In non-asserting builds (eg. VARIETY=hi), failure mode is infinite
loop in LOWalk, called from mps_arena_formatted_objects_walk.
To reproduce, do this on Mac OS X:
p4 sync /project/mps/branch/2006-05-31/feedback/...@159437
make -f xcppgc.gmk
MPS ASSERTION FAILURE: i < j
The bug is a simple typo in the second line:
next = (*format->skip)(object);
next = AddrSub(object, format->headerSize);
(which should read "AddrSub(next,...").
It was introduced by change 28076, which was adding
format->headerSize arithmetic to poollo.c to make it support
Could a compiler warning have caught this?
Clearly the coverage test locv.c doesn't test this: it should.
Coverage test fixed: call mps_arena_formatted_objects_walk and
check we find the right number of test objects.
Would be nice to:
1. check that other pool classes' coverage tests do test this;
2. quick visual inspection of the diffs around change 28076.
|Created by||Richard Kistruck|
|Created on||2006-06-28 14:47:01|
|Last modified by||Gareth Rees|
|Last modified on||2014-04-12 22:04:44|
|History||2006-06-28 RHSK Created.|
|159446||closed||2006-06-28 16:22:04||Richard Kistruck||MPS LO pool coverage test: in stepper, mark unused args with testlib_unused()|
|159442||closed||2006-06-28 15:34:07||Richard Kistruck||MPS LO pool coverage test: call mps_arena_formatted_objects_walk
and check we find the right number of test objects.
|159440||closed||2006-06-28 14:55:51||Richard Kistruck||MPS LO pool: correct LOWalk loop increment calculation. Should fix
AVER(i < j) on line 465 when you call mps_arena_formatted_objects_walk
when you have objects in an LO pool.