-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There has been a heuristics to detect user bugs where a reference-like object passed through CBPortal was not consumed timely. This turned out not to work nicely, as in the most straightforward use case: const string& s = co_await untilCBCalled( [&](Callback<void(const string&)> cb) { /*...*/ }; -- the involved `CBPortal`, being a temporary, will get destroyed before `CBPortal::wakeUp()` returns, leaving no opportunity to check whether the value has been consumed. The new test, `cb-reflike`, readily triggers a use-after-free when run with `-fsanitize=address` (I, however, had to move `CBPortal` in heap in that test to have adress sanitizer reliably detect the use-after-free). Fix that by removing the heuristics.
- Loading branch information
1 parent
234d572
commit d125962
Showing
2 changed files
with
20 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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