Repository navigation
fix(shell): owner 握手超时不再拼接空指针 (#99) - #226
Merged
Merged
Conversation
…99 A pure handshake timeout leaves failure_step null, so ready_failure now falls back to the current state like worker_failure does instead of concatenating a null pointer.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
clipboard_scenario_state.hpp的ready_failure()直接把failure_step_.load()拼进std::string:" failure_step=" + failure_step_.load()failure_step_是std::atomic<const char*>{nullptr}。当只是 ready 握手超时、没有任何 worker failure 时它仍为nullptr,std::string + nullptr是未定义行为(常见结果是崩溃或垃圾字符串)。同一文件的worker_failure()对此是有保护的(failed?failed:step_.load()),两处不一致。修改
ready_failure()采用与worker_failure()相同的回退:无 failure_step 时用当前state_step。验证
termforge_shell构建通过。该分支只在"握手超时且无 worker 失败"时触发,属于低频路径。背景
由 #99 的证据梳理中发现(该评论同时给出下一步唯一观测建议:失败瞬间
GetOpenClipboardWindow()的持有者类别)。Refs #99 #85