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

Teach miri about unsized locals #449

Closed
oli-obk opened this issue Aug 31, 2018 · 6 comments
Closed

Teach miri about unsized locals #449

oli-obk opened this issue Aug 31, 2018 · 6 comments
Labels
A-interpreter Area: affects the core interpreter C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Aug 31, 2018

These are just unsized in the typesystem. They are actually just fat pointers

https://play.rust-lang.org/?gist=43d2f8256e22ed27e79b5e58082b3357&version=nightly&mode=debug&edition=2015 is a small example that should work

@oli-obk oli-obk added the C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement label Aug 31, 2018
@RalfJung
Copy link
Member

Basically I think all we have to do is remove a bunch of asserts, and teach copy_op to with with the dynamic, not static, size. Shouldn't be hard.

... famous last words...

@RalfJung
Copy link
Member

Isn't this a duplicate of #438?

@RalfJung
Copy link
Member

RalfJung commented Dec 2, 2018

Likely also relevant (at least for tests): rust-lang/rust#54183

@RalfJung
Copy link
Member

For the record, here's the main implementation PR for the LLVM backend: rust-lang/rust#51131

@RalfJung
Copy link
Member

@oli-obk

These are just unsized in the typesystem. They are actually just fat pointers

Looking at the MIR, I cannot see this at all. What makes you say that?

My current impression is that the best way to support this is to actually have proper unsized locals, with the fat-ptr-meta stored in the Place that is stored in miri's locals table.

@RalfJung RalfJung added the A-interpreter Area: affects the core interpreter label Mar 8, 2019
Centril added a commit to Centril/rust that referenced this issue Apr 8, 2019
bors added a commit to rust-lang/rust that referenced this issue Apr 11, 2019
Miri: unsized locals and by-value dyn traits

r? @oli-obk
Cc @eddyb

Fixes rust-lang/miri#449
@RalfJung
Copy link
Member

RalfJung commented Aug 3, 2019

Has been fixed by rust-lang/rust#59780.

@RalfJung RalfJung closed this as completed Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-interpreter Area: affects the core interpreter C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement
Projects
None yet
Development

No branches or pull requests

2 participants