The UB arose due to self.context.para being MaybeUninit::zeroed,
which is an invalid value for an *mut dyn T, as fat pointers' vtable
pointer cannot be null.
Which means that during the phase on the left-hand side of the =, an
invalid object was created, which lead to UB.
The UB arose due to
self.context.para
beingMaybeUninit::zeroed
, which is an invalid value for an*mut dyn T
, as fat pointers' vtable pointer cannot be null.Which means that during the phase on the left-hand side of the
=
, an invalid object was created, which lead to UB.This, in turn, manifested in https://github.com/carllerche/loom/issues/50
Thank @nagisa for the help debugging this!