Title | mps_free doesn't check all addresses in range |
Status | closed |
Priority | optional |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | You can call mps_free on any range of addresses, and so long as the base of the range belongs to a pool, then MVT and MVFF will happily stuff the whole of the range into its free block manager, even if (say) the last byte of the range is not in the pool. This is unsatisfactory as it fails to detect erroneous sizes in calls to mps_free() in the client program. |
Analysis | Need to add a new function PoolOfRange which determines whether a contiguous range of addresses belongs to a single pool, and if so, which pool it is.
Naively this would be an O(n) operation as we have to check all tracts in the range. But perhaps we can avoid this by seeing if the base and limit lie in the same "run" of tracts? This would depend on the arena coalescing adjacent runs. |
How found | inspection |
Observed in | 1.111.0 |
Created by | Gareth Rees |
Created on | 2013-06-06 16:49:33 |
Last modified by | Gareth Rees |
Last modified on | 2013-06-07 13:20:20 |
History | 2013-06-06 GDR Created. |