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

Figure out a way to do name resolution in value vs type namespace #1123

Closed
RalfJung opened this issue Dec 22, 2019 · 0 comments · Fixed by #2661 or #2696
Closed

Figure out a way to do name resolution in value vs type namespace #1123

RalfJung opened this issue Dec 22, 2019 · 0 comments · Fixed by #2661 or #2696
Labels
A-interpreter Area: affects the core interpreter C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement

Comments

@RalfJung
Copy link
Member

RalfJung commented Dec 22, 2019

See the discussion at #1101 (comment): we'd like variants of resolve_path that specifically check the value or type namespace.

To my surprise, according to what @oli-obk said, this is actually not entirely trivial to do? Given that this is the basis of name resolution in rustc, I would have expected that to be much simpler than getting a weird "lookup in whatever namespace", which seems to be the operation we have right now.

@RalfJung RalfJung added C-enhancement Category: a PR with an enhancement or an issue tracking an accepted enhancement A-interpreter Area: affects the core interpreter labels Dec 22, 2019
@bors bors closed this as completed in a59fa5c Nov 26, 2022
RalfJung pushed a commit to RalfJung/rust that referenced this issue Nov 27, 2022
make no_std work on Windows

Also fixes rust-lang/miri#1123 by cherry-picking a patch by `@DrMeepster.`
bors added a commit that referenced this issue Jun 15, 2023
Dereference pointers in shims as correct types

Currently, shims will dereference pointers as the type written by the user. This can cause false positives, incorrect behavior such as #2136, and even ICEs if a field is not present.

This PR fixes this by having shims dereference pointers with types from `std` or `libc` that we can rely on the layout and field names of instead of with whatever the user passed in.

Fixes #1123
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
1 participant