Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion experiments/shell/clipboard_scenario_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class ClipboardScenarioOwner {
}
std::string ready_failure(DWORD wait_status) const {
return std::string("clipboard owner failed its bounded ready handshake: mode=")+
(delayed_?"delayed":"occupied")+" step="+step_.load()+
(delayed_?"delayed":"occupied")+" failure_step="+failure_step_.load()+

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle an unset failure step when readiness times out

If the ready handshake times out before the worker records a failure, failure_step_ is still nullptr. The constructor explicitly calls ready_failure() when ready_status != WAIT_OBJECT_0, even when error_ is zero, so concatenating this pointer into a std::string invokes undefined behavior instead of reporting the blocked step. This can crash the scenario before its diagnostic is emitted and before stop() runs. Load the pointer once and substitute the current step or a non-null sentinel when no failure has been recorded.

Useful? React with 👍 / 👎.

" state_step="+step_.load()+
" win32_error="+std::to_string(native_error_.load())+
" worker_error="+std::to_string(error_.load())+
" registration_last_error="+std::to_string(registration_error_.load())+
Expand Down