Miri: refactor handling of "uncanonical" AllocIds #71194
Labels
A-miri
Area: The miri tool
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
There are (at least) two situations where Miri uses a different
AllocId
for allocations than would be used in already created "global" allocations:extern static
are supported by mapping them to another, existing allocation.AllocId
for each thread.Currently both of these use different systems, and the
extern static
system has some disadvantages like not erroring on this program:We should use the same system for both, and that system should be to do whatever adjustments we need to do when converting
Pointer<()>
(an untagged pointer, in globaltcx
memory) toPointer<M::PointerTag>
.With #70685 resolved we might not need this for TLS statics any more, depending on the solution. But it would still be good to do this for
extern static
. Either way, as part of this we should also cleanup the TLS static handling in Miri, which currently special-casesConstValue::Scalar
being converted into Miri machine values -- we should do the right thing for all pointers in constants/globals.Cc @oli-obk
The text was updated successfully, but these errors were encountered: