diff options
author | Robin Watts <robin@peeves.(none)> | 2013-04-25 06:09:47 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-04-26 14:42:53 +0100 |
commit | d1a3e6b7b72f54f291f11a50cd5c043984126885 (patch) | |
tree | e04c82058e46afcee8b2f010f759e836e06eeae2 /COPYING | |
parent | bfd1effe99d5038577cdc0be889e5424613f3c08 (diff) | |
download | mupdf-d1a3e6b7b72f54f291f11a50cd5c043984126885.tar.xz |
Multi-threaded store SEGV fixes and debug improvements.
Fix race condition in the store. When storing an item, we
immediately put it into the hash (thus getting our existence
check). We then check and try to free enough space for it in
the budget. If we cannot free enough, we remove the item
from the hash. The race condition comes if someone else finds
it in the hash in the meantime.
To fix this, we update all 'finds' of things in the hash to
move it to the head of the LRU chain (regardless of whether it
was in the chain before or not). We only remove it from the
hash in the 'failed-to-fit-in-the-budget' case if it's not in the
chain already.
Also, we fix a bug in the "failed to fit" removal case where we
were failing to realise that the the pos pointer was not valid
any more.
In the course of tracking this bug down various debug functions
were improved. These are committed here too.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions