|Title||Interior ambiguous pointers can give PoolAMS a headache|
|Assigned user||Nick Barnes|
|Description||PoolAMS (automatic mark-sweep) supports ambiguous pointers. If such a pointer points into the interior of an object, the single grain which that pointer points to can be preserved by the collection. However, this grain doesn't contain a whole object, so can't be handled properly by subsequent format method calls. The result is usually a failure on a subsequent collection (e.g. a format method core dumping or asserting out).|
|Analysis||Grey was represented as (notwhite & !notgrey). Fixing an ambiguous pointer into an AMS segment turns a white grain grey. If such a grain is at the head of an object, Scan then turns the whole object black (notwhite & notgrey). Otherwise, Scan leaves the grain alone, so there is a lone grey grain in the middle of an object. Reclaim has been rewritten to simply copy the notwhite table to the alloc table, so this single grain is preserved.|
The problem is that grey should be represented as (!notwhite & !notgrey). Then the grey grain has !notwhite, so is reclaimed in Reclaim.
Blacken needs to change as part of this fix. Currently it just sets all the bits in the notgrey table. With the new colour representations, that will turn grey objects into white, not black. In fact it needs to find grey objects (i.e. objects with grey first grain) and blacken them.
One could argue that Scan, and maybe Blacken, should reset interior grains of non-grey objects to white.
|Evidence||The AMSSSHE test fails.|
|Created by||Nick Barnes|
|Created on||2002‑06‑19 15:48:43|
|Last modified by||Nick Barnes|
|Last modified on||2002‑06‑20 16:48:23|
|History||2002-06-19 NB Created.|
2002-06-20 NB Updated to reflect my more complete understanding.
|30349||closed||2002‑06‑20 17:11:31||Nick Barnes||AMS now uses (!nonwhite & !nongrey) for grey. See analysis of job000535.|