Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICE around validation of bool and char #1467

Closed
RalfJung opened this issue Jul 5, 2020 · 5 comments · Fixed by rust-lang/rust#74059
Closed

ICE around validation of bool and char #1467

RalfJung opened this issue Jul 5, 2020 · 5 comments · Fixed by rust-lang/rust#74059
Labels
I-ICE Impact: makes Miri crash with some ICE

Comments

@RalfJung
Copy link
Member

RalfJung commented Jul 5, 2020

@niluxv found an ICE around validation of uninitialized char. Here's a self-contained example; this embeds linked-hash-map. It would be nice to minimize this further.

The actual ICE occurs here and it is unclear why, because uninitialized char usually work fine.

@niluxv
Copy link
Contributor

niluxv commented Jul 5, 2020

I used this example (playground link). It only includes the code from linked-hash-map that is required for the example to compile.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 5, 2020

Actually, even this ICEs:

fn main() {
    let _b: bool = unsafe { std::mem::MaybeUninit::uninit().assume_init() };
}

Something is very odd...

@RalfJung RalfJung changed the title ICE around validation of char ICE around validation of bool and char Jul 5, 2020
@RalfJung RalfJung added the I-ICE Impact: makes Miri crash with some ICE label Jul 5, 2020
@niluxv
Copy link
Contributor

niluxv commented Jul 5, 2020

Actually droping a LinkedHashMap is enough: playground link.
@RalfJung Oh, sorry, didn't see your comment.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 5, 2020

After fixing the ICE, things are worse: there is no error at all...

I'll need to do a full rustc bootstrap to get more debugging information, right now nothing makes any sense.^^ This will take a while.

@RalfJung
Copy link
Member Author

RalfJung commented Jul 5, 2020

rust-lang/rust#74059 should fix this.

Manishearth added a commit to Manishearth/rust that referenced this issue Jul 6, 2020
…oli-obk

Miri value validation: fix handling of uninit memory

Fixes rust-lang/miri#1456
Fixes rust-lang/miri#1467

r? @oli-obk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Impact: makes Miri crash with some ICE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants