-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
begin_unwind returns nomally in presence of foreign stack #30791
Comments
With the linked issue, I’m aware of at least 2 cases where this behaviour was encountered. |
When a diverging function returns, the behavior is undefined. Are you deliberately inserting an abort only after bugin_unwind or in general after every noreturn function?
Which diverging functions are you referring to? In general the compiler cannot detect this and since the behavior is undefined if it happens it doesn't have to.
|
Deliberately inside
Namely, the
|
@nagisa what would the alternative be? Perhaps calling C's |
(to clarify, we had some discussion on IRC, and the conclusion was to close) |
begin_unwind
is a diverging function, but sometimes it does return normally, when the panicking happens across the FFI boundary. We can, and should, detect normal return somewhere in these diverging functions and abort the process so we do not hit theud2
that’s generated after the call tobegin_unwind
.cc @alexcrichton
The text was updated successfully, but these errors were encountered: