Stream: t-compiler/const-eval

Topic: Miri formatting wrong


RalfJ (Feb 09 2019 at 12:31, on Zulip):

oO compare the output of this program when running normally and with Miri: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e138c2cf2dbc6c36912b575c04bf2643

RalfJ (Feb 09 2019 at 12:31, on Zulip):

@oli seems like somehow filling does not work when running in Miri?

RalfJ (Feb 09 2019 at 13:03, on Zulip):

somehow passing the formatting information (the width, in this case) does not work. that's some awful unsafe code if I recall correctly...

RalfJ (Feb 09 2019 at 13:20, on Zulip):

uuhhh... I got it

self.formatter as usize == ArgumentV1::show_usize as usize
RalfJ (Feb 09 2019 at 13:20, on Zulip):

this code compares function pointers

RalfJ (Feb 09 2019 at 13:20, on Zulip):

and relies on stable addresses

RalfJ (Feb 09 2019 at 13:51, on Zulip):

see https://github.com/rust-lang/rust/issues/58320

oli (Feb 10 2019 at 09:43, on Zulip):

Something will go horribly wrong in const eval and pointer comparison code some day

Last update: Nov 15 2019 at 21:30UTC