Title | BufferEmpty on AMS in mid-collection can break |
Status | closed |
Priority | optional |
Assigned user | Nick Barnes |
Organization | Ravenbrook |
Description | Pekka says, "In the two-table configuration (i.e. shareAllocTable is on), BufferEmpty can start using the allocTable as an alloc table in the middle of a collection. This can't be done, but turning the returned buffer area white will cause it to be reclaimed, and the code was already doing that, anyway." |
Analysis | Found by Pekka, who says "[make BufferEmpty] keep its hands off the allocTable, when it's being used for colour.". Here's his patch, from [1]: ------------------------------ 989,998c989,994 < } else { /* Start using allocTable, if possible. */ < /* If allocTable is being used as white table, we can't touch it, < * but the whiten below will cause this area to be reclaimed. */ < if (!(amsseg->colourTablesInUse && ams->shareAllocTable)) { < amsseg->allocTableInUse = TRUE; < BTSetRange(amsseg->allocTable, 0, amsseg->firstFree); < if (amsseg->firstFree < amsseg->grains) < BTResRange(amsseg->allocTable, amsseg->firstFree, amsseg->grains); < BTResRange(amsseg->allocTable, initIndex, limitIndex); < } --- > } else { /* start using allocTable */ > amsseg->allocTableInUse = TRUE; > BTSetRange(amsseg->allocTable, 0, amsseg->firstFree); > if (amsseg->firstFree < amsseg->grains) > BTResRange(amsseg->allocTable, amsseg->firstFree, amsseg->grains); > BTResRange(amsseg->allocTable, initIndex, limitIndex); ------------------------------ |
How found | automated_test |
Evidence | [1] <http://info.ravenbrook.com/mail/2002/06/21/13-06-18/0.txt > |
Observed in | 1.100.1 |
Introduced in | 1.100.0 |
Created by | Nick Barnes |
Created on | 2002-06-21 17:14:16 |
Last modified by | Gareth Rees |
Last modified on | 2014-04-12 21:08:22 |
History | 2002-06-21 NB Created |
Change | Effect | Date | User | Description |
---|---|---|---|---|
185434 | closed | 2014-04-10 18:16:29 | Gareth Rees | Don't turn on the allocTable in AMSBufferEmpty when it's shared with nonwhiteTable and the colour tables are in use -- this will turn any grey grains in the segment invalid. Add more checking to AMS, including the table use invariant. |