Stream: t-lang/wg-unsafe-code-guidelines

Topic: Assumptions about MIR semantics


RalfJ (Jun 18 2019 at 14:09, on Zulip):

@WG-unsafe-code-guidelines what do you think would be a good place to collect assumptions that rustc makes about MIR semantics? And what would that list contain so far?
Looks like #61922 will add another item. And then there is #60187 which however I think just assumes that after a StorageDead+StorageLive, the address of the local is allowed to differ. (There used to be more assumptions that however were a problem and thus got reverted in #61373).

nikomatsakis (Jun 18 2019 at 14:09, on Zulip):

That's an interesting idea

RalfJ (Jun 18 2019 at 14:09, on Zulip):

@Taylor Cramer if you think something is missing from this list, please let us know

nikomatsakis (Jun 18 2019 at 14:10, on Zulip):

It seems like to start we could just use an issue

gnzlbg (Jun 18 2019 at 14:22, on Zulip):

@RalfJ wasn't somebody interested / working on a MIR model ?

RalfJ (Jun 18 2019 at 14:22, on Zulip):

probably several people? don't know what you are referring to

gnzlbg (Jun 18 2019 at 14:26, on Zulip):

operational semantics for MIR

RalfJ (Jun 18 2019 at 14:26, on Zulip):

no I mean what project / which people

gnzlbg (Jun 18 2019 at 14:27, on Zulip):

miri, oli

RalfJ (Jun 18 2019 at 14:27, on Zulip):

but also I think this is not a 1-step task

gnzlbg (Jun 18 2019 at 14:27, on Zulip):

or a memory model for MIR or similar

RalfJ (Jun 18 2019 at 14:27, on Zulip):

I have in my head a description of what I think the interface between the MIR semantics and the memory model should look like

RalfJ (Jun 18 2019 at 14:27, on Zulip):

which is important because it fixes a lot of terminology without fixing all the behavior

gnzlbg (Jun 18 2019 at 14:28, on Zulip):

nono, i was just wondering if something like that was already partially being written somewhere, because maybe that place could also be used to document these things

RalfJ (Jun 18 2019 at 14:28, on Zulip):

and at some point I'll have the time to write that down

RalfJ (Jun 18 2019 at 14:28, on Zulip):

not that I know of

RalfJ (Jun 23 2019 at 12:13, on Zulip):

issue created: https://github.com/rust-lang/unsafe-code-guidelines/issues/150

Last update: Nov 20 2019 at 11:30UTC