diff --git a/repos/base/src/core/include/cpu_thread_component.h b/repos/base/src/core/include/cpu_thread_component.h index c4e2376019..ae0392a5bf 100644 --- a/repos/base/src/core/include/cpu_thread_component.h +++ b/repos/base/src/core/include/cpu_thread_component.h @@ -154,8 +154,19 @@ class Genode::Cpu_thread_component : public Rpc_object, { _address_space_region_map.add_client(_rm_client); - /* acquaint thread with its pager object */ - _pager_ep.manage(&_rm_client); + /* + * Acquaint thread with its pager object, caution on some base platforms + * this may raise an 'Out_of_meta_data' exception, which causes the + * destructor of this object to not being called. Catch it and remove this + * object from the object pool + */ + try { + _pager_ep.manage(&_rm_client); + } catch (...) { + _ep.dissolve(this); + throw; + } + _platform_thread.pager(&_rm_client); _trace_sources.insert(&_trace_source); }