Hey @WG-ffi-unwind -- should we sync? Do we want to try this over zoom to move faster maybe?
Yes, I was planning to do it with Zoom.
aaa sorry, I didn't realize we had settled on a time. I'll be able to join in ~10 minutes
( cc @Amanieu :point_up: )
not sure why you're not in the alias :)
something we said at the made me realize the catch with 1C
which is basically that one of our goals was to add shims in Cpanic=unwind to catch exceptions across the "C" boundary
since it is Cpanic=unwind, we cannot just make dtors abort
so we have to have a shim that permits longjmp but not other exceptions, presumably
which means that you can't say "UB to unwind if there are destrutors in scope" without clarifying the kind of unwinding
even so .. I think it might be preferable, or else a variant 1d where you say
but honestly I'm not convinced that the cure here is worse than the disease...
I should raise one other option
ok, I wrote out the other option. In short, if we sacrifice C++ exception interop, you get what seems to me to be a relatively minimal diff on today's ABI, and one that leaves some room for future decisions:
You need the forced exception distinction if you want to insert shims in
-Cpanic=abort mode, you can add shims to destructor calls to abort, since they should neve run.
In both cases, you probably only want the shims in debug builds, but they correspond to cases that are supposed to be UB.
what would these shims be for? aborting on a non-Rust, non-forced exception?
Yes, just catching accidental propagation
Maybe there's not much point
@WG-ffi-unwind I replaced Niko's "big ol' table" of desiderata with a table of the behaviors of different types of unwinding for each strategy we considered. I highlighted "unusual" features of each strategy, using orange where the difference is an unexpected footgun and green where it's an advantage of some kind.
I also assigned names to options 1, 1c, and 3
If anyone's available to double-check the table entries, and/or to provide feedback on the names and highlighting, I'd appreciate it!
I did not include Niko's added "after the fact" suggestion.
I've now fleshed out my draft of the blog post announcing the upcoming meeting: https://github.com/rust-lang/project-ffi-unwind/pull/21
I kept the "background" section, because it isn't terribly long.
Okay, I think it's pretty close to ready. @nikomatsakis I've opened a PR: https://github.com/rust-lang/project-ffi-unwind/pull/21
I don't have a way to post it to Rust Internals, so I will leave that to you unless you'd like me to help in some capacity.
Last updated: Jan 26 2022 at 08:34 UTC