Stream: wg-ffi-unwind

Topic: documenting how unwinding works per platform


nikomatsakis (Oct 16 2019 at 19:36, on Zulip):

Hey @gnzlbg -- how well do you know the details of the unwinding mechanisms from various platforms?

It seems like it'd be useful to have some notes on how major unwinding mechanisms work in the repository as a kind of "background". I'd also be interested in scheduling some times to do a "deep dive" into each platform, where we could discuss.

Do you think you'd be able to provide some notes on x86_64, for example? I'm not sure if you're familiar with SEH.

gnzlbg (Oct 16 2019 at 19:43, on Zulip):

I’m only familiar with Itanium from reading the spec. Most platforms follow it, except for Windows. I only know very basic things about Windows.

gnzlbg (Oct 16 2019 at 19:44, on Zulip):

The Itanium spec is surprisingly readable, I definitely recommend it.

nikomatsakis (Oct 16 2019 at 20:10, on Zulip):

ok, then maybe you'd like to leave some summary around itanium? (and perhaps a link to spec)

Adam C. Foltzer (Oct 16 2019 at 20:12, on Zulip):

at this point we should probably be pointing to the section in the amd64 ABI (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf). it's pretty much a transcription of the Itanium one, but it's nicer to have the context from the rest of the ABI

Adam C. Foltzer (Oct 16 2019 at 20:13, on Zulip):

@Alex Crichton seemed to know more about SEH than me when we spoke last week, so he might be able to help for Windows

gnzlbg (Oct 17 2019 at 08:39, on Zulip):

at this point we should probably be pointing to the section in the amd64 ABI (https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-1.0.pdf).

Yes, that's the normative document. I personally prefer to read https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html because that's only the unwinding part, and its easier to hyperlink to different sections of it, than trying to do so for a PDF.

gnzlbg (Oct 17 2019 at 08:41, on Zulip):

The most relevant part for us Level 1. Base ABI since the rest is C++ specific (although good to know if you care about how C++ treats its own exceptions)

gnzlbg (Oct 17 2019 at 08:42, on Zulip):

Within 1.6, sub-section "1.6.4 Rules for Correct Inter-Language Operation" is a very quick read

acfoltzer (Oct 17 2019 at 16:45, on Zulip):

I guess I'm too used to my dog-eared paper copy at this point :slight_smile:

nikomatsakis (Oct 17 2019 at 16:48, on Zulip):

It'd be great if somebody wanted to create a background/README.md file or something and add links like that

nikomatsakis (Oct 17 2019 at 16:48, on Zulip):

I'll try to skim it soon but .. yeah busy :)

Last update: Nov 15 2019 at 10:40UTC