Title | arenaFreeLandInsertSteal might pass an empty range to LandInsert |
Status | closed |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | arenaFreeLandInsertSteal steals an arena grain from the range of freed addresses, and then calls LandInsert with the remainder of the range. But stealing the arena grain might leave the remainder of the range empty, and this would cause an assertion failure in LandInsert, which asserts that the range is non-empty. |
Analysis | How can this case happen? Well, the bad case arises when: 1. we are calling ArenaFree with a single grain; 2. the block pool needs to be extended; 3. we cannot allocate more memory using arenaAllocPage (because it would hit the commit limit in pagesMarkAllocated). So the test case must ensure that there are many isolated ranges in the arena's free land (so that the block pool needs to be extended) and that the commit limit is tight (so that pagesMarkAllocated hits it). |
How found | inspection |
Evidence | [1] https://info.ravenbrook.com/mail/2018/08/01/11-04-05/0/ |
Test procedure | test/function/235.c |
Created by | Gareth Rees |
Created on | 2018-08-01 11:36:02 |
Last modified by | Gareth Rees |
Last modified on | 2018-08-13 14:42:25 |
History | 2018-08-01 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
194968 | closed | 2018-08-13 14:42:25 | Gareth Rees | Merge branch/2018-08-01/land-insert-steal into the master sources. |