We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd6a9ae commit b12f96bCopy full SHA for b12f96b
src/intptrcast.rs
@@ -98,6 +98,14 @@ impl<'mir, 'tcx> GlobalStateInner {
98
}
99
100
pub fn ptr_from_addr(ecx: &MiriEvalContext<'mir, 'tcx>, addr: u64) -> Pointer<Option<Tag>> {
101
+ trace!("Transmuting 0x{:x} to a pointer", addr);
102
+
103
+ // TODO: fix this at some point once we deal with function pointers
104
+ // Pointer::new(None, Size::from_bytes(addr))
105
+ Self::ptr_from_casted_addr(ecx, addr)
106
+ }
107
108
+ pub fn ptr_from_casted_addr(ecx: &MiriEvalContext<'mir, 'tcx>, addr: u64) -> Pointer<Option<Tag>> {
109
trace!("Casting 0x{:x} to a pointer", addr);
110
let global_state = ecx.machine.intptrcast.borrow();
111
0 commit comments