Add coroutine-hostile-raii lint for UnwindDetector, and add fixes - #7153
Open
jtolio wants to merge 1 commit into
Open
Add coroutine-hostile-raii lint for UnwindDetector, and add fixes#7153jtolio wants to merge 1 commit into
jtolio wants to merge 1 commit into
Conversation
|
The generated output of |
jtolio
force-pushed
the
jolio/add-coroutin-iivvz5
branch
from
August 27, 2026 21:08
a0fc3a8 to
ce193e4
Compare
Contributor
|
@jtolio Bonk workflow was cancelled. View workflow run · To retry, trigger Bonk again. |
The fixes in container-client fix not only the lint but also what appears to be the code's intent. The lints are fixed in standard.c++ but the behavior is unchanged and may be buggy. I'm not sure it is intended that the KJ_CATCH branch does not run when writeFailed == true. Added TODOs for a later followup.
jtolio
force-pushed
the
jolio/add-coroutin-iivvz5
branch
from
August 27, 2026 21:30
ce193e4 to
c03731f
Compare
harrishancock
approved these changes
Aug 28, 2026
| if (result.chunks.size() > 0) { | ||
| KJ_ON_SCOPE_FAILURE(writeFailed = true); | ||
| auto invocation = KJ_CO_MAGIC kj::CURRENT_INVOCATION; | ||
| // TODO(soon) - should this also handle invocation.isCanceling()? |
Collaborator
There was a problem hiding this comment.
Probably not, but @jasnell could perhaps confirm: If someone drops this pumpToImpl() coroutine's promise, should we set writeFailed = true?
I think the KJ_ON_SCOPE_FAILURE was probably just meant to be equivalent to a .catch_(), and not consider cancellation.
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.
This change adds a lint to prevent usage of UnwindDetector across coroutine pauses. See discussion on capnproto/capnproto#2789 why UnwindDetector is not safe on coroutines.
The fixes in container-client fix not only the lint but also what appears to be the code's intent.
The lints are fixed in standard.c++ but the behavior is unchanged and may be buggy. I'm not sure it is intended that the KJ_CATCH branch does not run when writeFailed == true.
Added TODOs for a later followup.