mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
packet_allocator: catch expection when calling free()
If a client acknowledges the same packet more than once, the packet also gets freed more than once. At the second attempt the underlaying Bit_array will throw an 'Invalid_clear' exception, which results in an uncaught exception that leads to an abort() call in the freeing component. Fixes #1462.
This commit is contained in:
parent
381711dbea
commit
e4f6fca355
@ -129,7 +129,7 @@ class Genode::Packet_allocator : public Genode::Range_allocator
|
||||
addr_t i = (((addr_t)addr) - _base) / _block_size;
|
||||
size_t cnt = (size % _block_size) ? size / _block_size + 1
|
||||
: size / _block_size;
|
||||
_array->clear(i, cnt);
|
||||
try { _array->clear(i, cnt); } catch(...) { }
|
||||
_next = i;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user