Description
This issue is part of the Strict Provenance Experiment - #95228
Oxford Casts are those that fly in the face of Harvard Architectures, and let you convert between data pointers and function pointers. In my current understanding, this affects both AVR and WASM.
For WASM, function pointers are actually indices into a ~vtable somewhere. This seems to mostly work fine and it's just a matter of "ask bad questions, get bad answers"
For AVR it causes Actual Compiler Problems that the stdlib seems to be actively routing around:
rust/library/core/src/ptr/mod.rs
Lines 1390 to 1395 in 9280445
I do not know what "resolving" this looks like. It could involve any of:
- just documenting the current state of affairs
- developing a "coherent" model for what these operations do
- fixing the compiler issues with AVR
- forbidding oxford casts on some or all targets
- introducing new APIs to "do it right"
I can't really help any more than this, because this is all outside my areas of expertese/motivation.