Stacked Borrows cannot properly handle extern type
#276
Labels
A-aliasing-model
Topic: Related to the aliasing model (e.g. Stacked/Tree Borrows)
extern type
#276
While working on rust-lang/miri#1725, I realized that Stacked Borrows does not really work properly when
extern type
is used: on a reborrow, the newly created reference is only valid for the memory range that Miri can actually know belongs to this reference. So a reference with anextern type
tail would be reborrowed in a way that that tail becomes inaccessible. This is incompatible with e.g. how the standard library format string machinery usesextern type
as its implementation forOpaque
.In a sense this is a variant of #134, but it felt worth pointing out separately.
The text was updated successfully, but these errors were encountered: