Skip to content

Commit 660ffaa

Browse files
Janosch MachowinskiJanosch Machowinski
Janosch Machowinski
authored and
Janosch Machowinski
committed
fix(static_storage): Throw if an invalid entry was detected
Signed-off-by: Janosch Machowinski <[email protected]>
1 parent 92d83ec commit 660ffaa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rclcpp/include/rclcpp/wait_set_policies/static_storage.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,14 @@ class StaticStorage : public rclcpp::wait_set_policies::detail::StoragePolicyCom
160160
services_,
161161
waitables_
162162
);
163+
164+
if(this->needs_pruning_) {
165+
// we need to throw here, as the indexing of the rcl_waitset is broken,
166+
// in case of invalid entries
167+
168+
throw std::runtime_error(
169+
"StaticStorage : storage_rebuild_rcl_wait_set: Detected invalid entity in static entity storage");
170+
}
163171
}
164172

165173
// storage_add_subscription() explicitly not declared here

0 commit comments

Comments
 (0)