Title | Failed arena creation is not correctly unwound |
Status | closed |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | In ArenaCreate, the initialization procedure goes like this: 1. class->init 2. ArenaFreeLandInsert 3. ControlInit 4. GlobalsCompleteCreate but if it fails, the unwind sequence goes: 3. ControlFinish 1. class->finish That is, there is no unwinding of step 2. This results in the following assertion: sa.c:41: MPS ASSERTION FAILED: BTIsResRange(sa->mapped, 0, sa->length) |
Analysis | Compare with ArenaDestroy, which goes: 3. ControlFinish 2. LandFinish + MFSFinishTracts 1. class->finish The bug was introduced in change 184783 [1]. It was not caught by review -- it looks as if we need a review checklist. It was not caught by test case because there is no test case for a failed ArenaCreate, and that is because it is very hard to write one (there is nothing that we can pass to mps_arena_create_k that will cause ControlInit to fail). Note that this is a specific instance of job003482. |
How found | manual_test |
Evidence | [1] https://info.ravenbrook.com/infosys/cgi/perfbrowse.cgi?%40describe+184783 |
Created by | Gareth Rees |
Created on | 2015-08-06 18:47:46 |
Last modified by | Gareth Rees |
Last modified on | 2016-03-13 00:29:05 |
History | 2015-08-06 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
188144 | closed | 2015-08-14 10:57:06 | Gareth Rees | Merge branch/2015-08-10/arena-create into the master sources. |