Repository navigation
fix: defer await_ready into await_suspend on affected MSVC builds - #469
Conversation
|
An automated preview of the documentation is available at https://469.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-10-23 18:45:31 UTC |
|
GCOVR code coverage report https://469.capy.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-10-23 19:06:41 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #469 +/- ##
===========================================
+ Coverage 98.36% 98.47% +0.10%
===========================================
Files 137 137
Lines 7293 7293
===========================================
+ Hits 7174 7182 +8
+ Misses 119 111 -8
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
On MSVC 14.51 ARM64 release, the void-returning symmetric_transfer does not prevent every lost catch. With a call before a try, and an awaiter whose await_ready performs an atomic read-modify-write (as async_waker's does to consume a latched wakeup), a throw inside the try escaped the catch beside it and reached unhandled_exception. A plain or atomic load in await_ready did not trigger it, nor did anything tested on 14.44. Where BOOST_CAPY_SYMMETRIC_TRANSFER_WORKAROUND is on, task's and quitter's transform_awaiter now report not ready, and ask the wrapped await_ready from inside await_suspend through the new detail::await_ready_then_suspend. It calls await_ready exactly once, since it may consume state, and returns false to continue without suspending when the awaitable is ready, so immediate completions do not grow the stack. Builds without the workaround are unchanged. Add regression tests: testCatchAfterRmwAwaitReady and testCatchAroundWakerWait in task.cpp, and testCatchAfterRmwAwaitReady and testCatchStopAfterRmwAwaitReady in quitter.cpp. Without the fix all four fail on MSVC 14.51 ARM64 release and pass on ARM64 14.44, x64 14.44 and x64 14.51. testVoidSuspendAwaitable covers the helper's not-ready, void await_suspend branch. Correct the gate comments: the handle-return defect on ARM64 also reproduces on 19.44, where the 19.34-19.44 clause already covers it.
1050a6b to
e1a78b3
Compare
On MSVC 14.51 ARM64 release, the void-returning symmetric_transfer does not prevent every lost catch. With a call before a try, and an awaiter whose await_ready performs an atomic read-modify-write (as async_waker's does to consume a latched wakeup), a throw inside the try escaped the catch beside it and reached unhandled_exception. A plain or atomic load in await_ready did not trigger it, nor did anything tested on 14.44.
Where BOOST_CAPY_SYMMETRIC_TRANSFER_WORKAROUND is on, task's and quitter's transform_awaiter now report not ready, and ask the wrapped await_ready from inside await_suspend through the new detail::await_ready_then_suspend. It calls await_ready exactly once, since it may consume state, and returns false to continue without suspending when the awaitable is ready, so immediate completions do not grow the stack. Builds without the workaround are unchanged.
Add testCatchAfterRmwAwaitReady and testCatchAroundWakerWait. Correct the gate comments: the handle-return defect on ARM64 also reproduces on 19.44, where the 19.34-19.44 clause already covers it.