about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-07-08 16:07:08 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-07-09 23:13:24 +0200
commit620599e8860b92db1ebbcef3f50671b937aec9cd (patch)
tree21a505cec7390ebbd593526c33d1dc675ad1610b /src/libstd/sys/unix/stack_overflow.rs
parentc6807bb1b282e0c5398aa4e659dbc165b6f3c81b (diff)
downloadrust-620599e8860b92db1ebbcef3f50671b937aec9cd.tar.gz
rust-620599e8860b92db1ebbcef3f50671b937aec9cd.zip
Remove `extern` on the `pub fn rust_oom` lang item in libstd, to match ABI of the declaration in liballoc
This turned out to be important on Windows.
Calling `handle_alloc_error(Layout::new::<[u8; 42]>())` caused:

```
Exception thrown at 0x00007FF7C70DC399 in a.exe: 0xC0000005:
Access violation reading location 0x000000000000002A.
```

0x2A equals 42, so it looks like the `Layout::size` field of type `usize`
was interpreted as a pointer to read from.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions