Commit ffecd4ae authored by Julien Muchembled's avatar Julien Muchembled

client: check type of 'oid' parameter when loading an object

Since the switch to msgpack, there's no more type checking at protocol level
and for example passing an integer would cause storage nodes to crash.

But as shown here, the type checking of the old protocol was not always
enough, because data structures at client side could anyway get wrong.
parent 20791999
......@@ -411,6 +411,8 @@ class Application(ThreadedApplication):
result = self._cache.load(oid, before_tid)
if result:
return result
u64(oid) # check type to not pollute _loading
# or crash storage nodes
load_lock = self._loading[oid][0]
acquired = load_lock.acquire(0)
# Several concurrent cache misses for the same oid are probably
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment