The requirements of futures_task::waker(a) and futures_task::waker_ref(&a) for all a should be the same. However in the current implementation, the former requires a to be 'static, while the latter does not. This enables a static Waker to be obtained from a non-static a, resulting in some potential use-after-free problem.
The requirements of
futures_task::waker(a)
andfutures_task::waker_ref(&a)
for alla
should be the same. However in the current implementation, the former requiresa
to be'static
, while the latter does not. This enables a staticWaker
to be obtained from a non-statica
, resulting in some potential use-after-free problem.