Title | Client arena fails to detect too-small size |
Status | closed |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | If you try to create a client arena with a MPS_KEY_ARENA_SIZE that's too small for a full complement of zones, then mps_arena_create_k should return MPS_RES_MEMORY. But in fact you get an assertion failure: ./arena.c:157: MPS ASSERTION FAILED: ((Size)1 << arena->zoneShift) >= arena->grainSize |
Analysis | The code in arenacl.c [1] tests the condition: size < grainSize * MPS_WORD_SHIFT but the correct condition is the one in arenavm.c [2]: size < grainSize * MPS_WORD_WIDTH This was not discovered because the automated test for small arena sizes [3] only creates VM arenas. |
How found | automated_test |
Evidence | [1] <http://www.ravenbrook.com/project/mps/master/code/arenacl.c >[2] < http://www.ravenbrook.com/project/mps/master/code/arenavm.c >[3] < http://www.ravenbrook.com/project/mps/master/test/function/121.c > |
Created by | Gareth Rees |
Created on | 2015-08-10 11:36:10 |
Last modified by | Gareth Rees |
Last modified on | 2016-03-13 00:29:18 |
History | 2015-08-10 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. |