You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2025. It is now read-only.
Rollup merge of rust-lang#71569 - samrat:miri-ub-on-size-mismatch, r=RalfJung
[miri] Throw UB if target size and data size don't match
Issue: rust-lang/miri#1355
If an extern C function is defined as
```
extern "C" {
fn malloc(size: u32) -> *mut std::ffi::c_void;
}
```
on a 64-bit machine(ie. pointer sizes don't match), return undefined behaviour from Miri when [converting the argument into machine_usize](https://github.com/rust-lang/miri/blob/master/src/shims/foreign_items.rs#L200)
0 commit comments