Title | Computed chunk size assertion may fail |
Status | closed |
Priority | essential |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | MMQA test case function/119.c fails with: !assertcond=computedChunkSize == ChunkSize(chunk) |
Analysis | After creating the first chunk in VMArenaCreate, we check its size against the result computed by vmArenaChunkSize corresponding to the amount of usable address space in the chunk. However, vmArenaChunkSize computes the *smallest* size of chunk that contains a specified amount of usable address space. There may be other sizes of chunk that contain the same amount of usable address space. In particular, function/119.c creates an arena with initial chunk size of 0xa00001. This gets rounded up to a chunk of size 0xa01000, which has 0x9eb000 bytes of usable address space. But a smaller chunk, of size 0xa00000, would also have 0x9eb000 bytes of usable address space! The extra page of chunk requires an extra page of overhead and so contributes nothing. Note that it's the assertion that's wrong, not the computation in vmArenaChunkSize. |
How found | automated_test |
Evidence | None as yet. |
Created by | Gareth Rees |
Created on | 2016-04-22 16:57:36 |
Last modified by | Gareth Rees |
Last modified on | 2016-04-22 17:04:50 |
History | 2016-04-22 GDR Created. |
Change | Effect | Date | User | Description |
---|---|---|---|---|
191574 | closed | 2016-04-22 17:04:50 | Gareth Rees | The computed chunk size is the smallest size with a given number of usable bytes -- the actual chunk may be one grain larger. |