Never throw in 'Attached_rom_dataspace::size'

If the ROM service returned in invalid dataspace, reflect this condition
via a size of zero instead of triggering an exception of type
'Reconstructible<Attached_dataspace>::Deref_unconstructed_object'.

Issue #3606
This commit is contained in:
Norman Feske 2020-01-14 22:58:48 +01:00 committed by Christian Helmuth
parent c6445da654
commit d70cf314d8
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ class Genode::Attached_rom_dataspace
template <typename T> T const *local_addr() const {
return _ds->local_addr<T const>(); }
size_t size() const { return _ds->size(); }
size_t size() const { return _ds.constructed() ? _ds->size() : 0; }
/**
* Register signal handler for ROM module changes