fix(test): remove two undefined reads

- PluginServices.Control: the condition variable predicate could read
  nextState before the callback wrote it; initialize it
- MemoryResources.allocator: &*v.end() dereferences the end iterator;
  compute the end address from v.data() + v.size()

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-03 14:05:18 +00:00
committed by Dennis Klein
parent e59a410951
commit df7d99bb76
2 changed files with 3 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ TEST_F(PluginServices, Control)
ASSERT_NO_THROW(mServices.TakeDeviceControl("foo"));
ASSERT_NO_THROW(mServices.ChangeDeviceState("foo", DeviceStateTransition::InitDevice));
DeviceState nextState;
DeviceState nextState{DeviceState::Undefined};
condition_variable cv;
mutex cv_m;
mServices.SubscribeToDeviceStateChange("test", [&](DeviceState newState){