diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-04-26 21:02:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-26 21:02:39 +0200 |
| commit | b2a8a8a0f882728809a99841787cd8f745768f5f (patch) | |
| tree | 8b8c2a0ef1c5462cceccfead3db274faa274ff55 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | d1287746cd16c793131969b623e39956d783f545 (diff) | |
| parent | c8d8c42d1ce10d945bcd8cbff3ac9858fc909abc (diff) | |
| download | rust-b2a8a8a0f882728809a99841787cd8f745768f5f.tar.gz rust-b2a8a8a0f882728809a99841787cd8f745768f5f.zip | |
Rollup merge of #71569 - samrat:miri-ub-on-size-mismatch, r=RalfJung
[miri] Throw UB if target size and data size don't match
Issue: https://github.com/rust-lang/miri/issues/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)
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
