{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/54461","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/54461/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/54461/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/54461/events","html_url":"https://github.com/rust-lang/rust/pull/54461","id":362846338,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDUxMDcx","number":54461,"title":"miri engine: basic support for pointer provenance tracking","user":{"login":"RalfJung","id":330628,"node_id":"MDQ6VXNlcjMzMDYyOA==","avatar_url":"https://avatars1.githubusercontent.com/u/330628?v=4","gravatar_id":"","url":"https://api.github.com/users/RalfJung","html_url":"https://github.com/RalfJung","followers_url":"https://api.github.com/users/RalfJung/followers","following_url":"https://api.github.com/users/RalfJung/following{/other_user}","gists_url":"https://api.github.com/users/RalfJung/gists{/gist_id}","starred_url":"https://api.github.com/users/RalfJung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RalfJung/subscriptions","organizations_url":"https://api.github.com/users/RalfJung/orgs","repos_url":"https://api.github.com/users/RalfJung/repos","events_url":"https://api.github.com/users/RalfJung/events{/privacy}","received_events_url":"https://api.github.com/users/RalfJung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-22T10:39:03Z","updated_at":"2018-09-22T14:10:31Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/54461","html_url":"https://github.com/rust-lang/rust/pull/54461","diff_url":"https://github.com/rust-lang/rust/pull/54461.diff","patch_url":"https://github.com/rust-lang/rust/pull/54461.patch"},"body":"This enriches pointers with a new member, `tag`, that can be used to do provenance tracking. This is a new type parameter that propagates up through everything. It defaults to `()` (no tag), which is also the value used by CTFE -- but miri will use another type.\r\n\r\nThe only actually interesting piece here, I think, is what I had to do in the memory's `get`. The problem is that `tcx` (storing the allocations for statics) uses `()` for provenance information. But the machine might need another tag. The machine has a function to do the conversion, but if a conversion actually happened, we need to store the result of this *somewhere* -- we cannot return a pointer into `tcx` as we usually would.\r\nSo I introduced `MonoHashMap` which uses `RefCell` to be able to insert new entries even when we just have a shared ref. However, it is important that we can also return shared refs into the map without holding the `RefCell` opan. This is achieved by boxing the values stored in the map, so their addresses remain stable even when the map's table gets reallocated. This is all implemented in `mono_hash_map.rs`.\r\n\r\nNOTE: This PR also contains the commits from https://github.com/rust-lang/rust/pull/54380#issuecomment-423130753. Only the [last commit](https://github.com/rust-lang/rust/pull/54461/commits/e6f69b1be52ea51abb060b0b3f4c435a31578bd9) is new."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/423746820","html_url":"https://github.com/rust-lang/rust/pull/54461#issuecomment-423746820","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/54461","id":423746820,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzc0NjgyMA==","user":{"login":"eddyb","id":77424,"node_id":"MDQ6VXNlcjc3NDI0","avatar_url":"https://avatars2.githubusercontent.com/u/77424?v=4","gravatar_id":"","url":"https://api.github.com/users/eddyb","html_url":"https://github.com/eddyb","followers_url":"https://api.github.com/users/eddyb/followers","following_url":"https://api.github.com/users/eddyb/following{/other_user}","gists_url":"https://api.github.com/users/eddyb/gists{/gist_id}","starred_url":"https://api.github.com/users/eddyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddyb/subscriptions","organizations_url":"https://api.github.com/users/eddyb/orgs","repos_url":"https://api.github.com/users/eddyb/repos","events_url":"https://api.github.com/users/eddyb/events{/privacy}","received_events_url":"https://api.github.com/users/eddyb/received_events","type":"User","site_admin":false},"created_at":"2018-09-22T14:10:31Z","updated_at":"2018-09-22T14:10:31Z","author_association":"MEMBER","body":"> So I introduced `MonoHashMap`\r\n\r\nAs a general note, I'd like to not merge such changes until multiple people have looked at the problem, and decided that the new data structure *is needed*."}}
{"actor":{"display_login":"eddyb"}}