[exec.schedule.from] Potential access to destroyed state in impls-for::complete
#233
Labels
bug
Something isn't working
P0
pending-wg21
A paper or an LWG issue exits
processed
processed in a meeting
wording
The current specification of
schedule_from
algorithm has the following definition forimpls-for<schedule_form_t>::complete
:The call to TRY-EVAL here will invoke
set_error()
on the receiver if the construction ofresult_t
throws an exception.As the call to
set_error()
can potentially end up destroying the operation-state, the subsequent access ofstate.async-result.valueless_by_exception()
is potentially accessing a dangling reference tostate
.Instead, we need to have this function
return;
afterset_error()
is called. This may mean we need to directly define the expansion ofTRY-EVAL
instead of using the macro.e.g. something like:
The text was updated successfully, but these errors were encountered: