MPS issue job004021

TitleComputed chunk size assertion may fail
Assigned userGareth Rees
DescriptionMMQA test case function/119.c fails with:

!assertcond=computedChunkSize == ChunkSize(chunk)
AnalysisAfter 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 foundautomated_test
EvidenceNone as yet.
Created byGareth Rees
Created on2016-04-22 16:57:36
Last modified byGareth Rees
Last modified on2016-04-22 17:04:50
History2016-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.