Commit 43feda9
committed
let_value, _error, & _stopped: Use After Move On Exception From Connect
When a completion signal is sent on the appropriate completion channel
(i.e. set_value, set_error, or set_stopped) let_value, let_error, and
let_stopped (respectively):
1. Store the values associated with the signal, if any,
2. Invoke their associated invocable with those stored values, and then
3. Connect the sender returned by that invocation
Prior to this commit the implementation of the operations enumerated
above moved the final receiver into the connect operation in step 3
(more precisely those implementations moved the final receiver into a
wrapper receiver which was in turn moved into that connect operation).
This meant that if the connect operation:
1. Decay-copied the receiver (thereby moving from it), and then
2. Threw an exception
The resulting error completion signal would be sent to a receiver which
had been moved from.
Reproduced in a unit test and fixed.1 parent de7420a commit 43feda9
File tree
2 files changed
+41
-2
lines changed- include/stdexec/__detail
- test/stdexec/algos/adaptors
2 files changed
+41
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
347 | 349 | | |
348 | 350 | | |
349 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
350 | 389 | | |
0 commit comments