Repository navigation
Conversation
Previously the child stayed RUNNING, so the next halt of the parent halted it again and threw a second time. When that happened inside ~Tree(), the process terminated. Callers still see the exception. This covers haltChild() and haltChildren(), which calls it. ControlNode::resetChildren() and DecoratorNode::resetChild() have the same pattern and are left for a follow-up.
This was referenced Oct 29, 2026
This branch has not been deployed
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.
Split out of #1229, as requested in review.
ControlNode::haltChildnow resets the child's status before rethrowing an exception from the child'shalt(). Previously the child stayed RUNNING, so the next halt of the parent halted it again and threw a second time. When that happened inside~Tree(), the process terminated. Callers still see the exception.haltChildren()gets the fix throughhaltChild().tests/gtest_halt_child.cppadds a control node that halts its child throughhaltChild(), with a child whoseonHalted()throws. Without the fix the second halt callsonHalted()again and throws, the child is left RUNNING, and the test binary aborts instd::terminatewhen the tree is destroyed. With the fix it passes.ControlNode::resetChildren()andDecoratorNode::resetChild()have the same pattern. I left them out to keep this small and can add them here if you prefer.API/ABI: no signature changes.