rust-lang/rust-memory-model

Can `resume_unwind` take an arbitrary box?

Closed this issue · 3 comments

On IRC, @mystor asked me whether resume_unwind could be given some random box, even when it is not in the middle of a panic. Given that resume_unwind is safe, the answer is presumably yes, though it might have other undesirable behavior.

My understanding is that resume_unwind is simply panic! without invoking panic handlers. So passing an arbitrary box should be fine and will just cause the panic handlers not to be called. This behavior just needs to be documented properly.

@Amanieu seems reasonable.

Closing because this looks like a libs/docs issue, not a UCG concern.