async-on-embedded
async-on-embedded copied to clipboard
{task,Executor}::block_on are unsound
It is possible for the future passed to block_on to stash a clone of the provided Waker somewhere, then call wake on it after completion, resulting in an attempt to access the ready variable from the freed block_on stack.
Hmm, is it possible to save this waker in a safe way?
Yes, it could be put into a static WAKER: RefCell<Option<Waker>>; or similar construct.