Stream: project-ffi-unwind

Topic: `"C-unwind"` next steps


view this post on Zulip BatmanAoD (Kyle Strand) (Mar 20 2021 at 18:25):

I think this is an accurate summary of our next steps, and their priorities/timing, based on the various discussions:

Before the next beta cut:

Soon:

Eventually (may be combined with other implementation work):

view this post on Zulip BatmanAoD (Kyle Strand) (Mar 20 2021 at 18:26):

Everything except the blog post is new rustc implementation work. @katelyn martin are you up for taking all of these on?

view this post on Zulip BatmanAoD (Kyle Strand) (Mar 20 2021 at 18:33):

BatmanAoD (Kyle Strand) said:

Everything except the blog post is new rustc implementation work. katelyn martin are you up for taking all of these on?

Sorry, I mean, taking all the implementation stuff on? I am happy writing the blog post, unless you'd like to.

view this post on Zulip RalfJ (Mar 22 2021 at 11:39):

I believe that it would be more correct to use the new "C-unwind" behavior, rather than the old behavior of using nounwind, since the old behavior had a soundness bug.

Agreed. We just closed that soundness issue, would be a shame to reopen it. :D
I would also appreciate help keeping https://github.com/rust-lang/rust/issues/52652 up-to-date. :)

view this post on Zulip RalfJ (Mar 22 2021 at 11:41):

Remove #[unwind(allowed)]

FWIW, I have a draft patch for that sitting somewhere, but it is really annoying to do that before beta supports C-unwind (the attribute is used by a bunch of the internal libstd machinery)

view this post on Zulip RalfJ (Mar 22 2021 at 11:42):

Before the next beta cut:

Eh, we just had a beta cut this week-end. So this is somewhat urgent if you dont want it to hit stable in 6 weeks.^^

view this post on Zulip BatmanAoD (Kyle Strand) (Mar 22 2021 at 16:07):

RalfJ said:

Before the next beta cut:

Eh, we just had a beta cut this week-end. So this is somewhat urgent if you dont want it to hit stable in 6 weeks.^^

Darn! Hm.... I do think landing a patch to make "C" behave like "C-unwind" landing in the next release would be ideal. If we don't have a working patch before the release, though, could we simply revert the change in the beta branch?

view this post on Zulip BatmanAoD (Kyle Strand) (Mar 22 2021 at 16:09):

I think that may be a release-team decision.

view this post on Zulip Josh Triplett (Mar 22 2021 at 23:33):

I'm a little confused. Is making "C" behave like "C-unwind" a temporary compatibility measure? (I'm not up to date on the current transition plan.)

view this post on Zulip BatmanAoD (Kyle Strand) (Mar 22 2021 at 23:46):

@Josh Triplett Yes; here's the behavior for unwinding through the "C" ABI:

We want the abort behavior to be behind the "C-unwind" feature flag, but we don't want to re-introduce UB because of a soundness issue caused by the specified UB.

view this post on Zulip RalfJ (Mar 24 2021 at 18:30):

If we don't have a working patch before the release, though, could we simply revert the change in the beta branch?

I guess we could, though large reverts carry their own risk

view this post on Zulip RalfJ (Mar 24 2021 at 18:30):

indeed this would be something to discuss with the release team

view this post on Zulip BatmanAoD (Kyle Strand) (Apr 09 2021 at 20:47):

@katelyn martin checking in regarding our schedule for fixing the "C" issue before your change hits Stable. There are 4 weeks left until release, so it's looking to me like we will probably need to do the revert instead of the patch; do you agree?

view this post on Zulip katelyn martin (Apr 13 2021 at 14:20):

@BatmanAoD (Kyle Strand) I've opened up https://github.com/rust-lang/rust/pull/84158, which should address the concerns above.

view this post on Zulip katelyn martin (Apr 13 2021 at 14:31):

Relatedly, I saw https://github.com/rust-lang/rust/issues/83541, which seems to be a report of the same issue described in the "_Is unwinding through.._" topic the other day.


Last updated: Jan 26 2022 at 08:02 UTC