Message32322
As I first mentioned in my post[1] on comp.lang.python, it seems possible to modify a dict while a lookup is ongoing, without causing the lookup to restart. This requires the ma_table be reallocated twice (first to a new address, then a second time back to the original address). This could also happen if the constants or behaviour relating to ma_smalltable were changed, but the current implementation is safe.
To fix this, I suggest two more tests be added along side the ep0 and startkey tests that currently restart the lookup process.
1) ma_mask. If ma_table was reallocated, and the new allocation is smaller, memory corruption would result. Checking ma_mask for changes would ensure this doesn't happen.
2) reallocation counter. Increment every time ma_table is reallocated. It would be technically possible to overflow this, but the circumstances would be exceedingly unusual.
[1] http://groups.google.com/group/comp.lang.python/browse_thread/thread/7f5b8fc59aadbdea/d77bdbcf5b20c056 |
|
Date |
User |
Action |
Args |
2007-08-23 14:55:00 | admin | link | issue1736792 messages |
2007-08-23 14:55:00 | admin | create | |
|