<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/alloc.rs, branch 1.31.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.31.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.31.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-09-28T03:52:53+00:00</updated>
<entry>
<title>Bump to 1.31.0 and bootstrap from 1.30 beta</title>
<updated>2018-09-28T03:52:53+00:00</updated>
<author>
<name>Josh Stone</name>
<email>jistone@redhat.com</email>
</author>
<published>2018-09-26T21:26:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ce034951fb907c8aa6abd5e6e04769e5e628953c'/>
<id>urn:sha1:ce034951fb907c8aa6abd5e6e04769e5e628953c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rustc: Continue to tweak "std internal symbols"</title>
<updated>2018-08-26T23:34:14+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2018-08-23T07:33:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0a2282e1286823c06ee9c4fa5e49544fc4f47771'/>
<id>urn:sha1:0a2282e1286823c06ee9c4fa5e49544fc4f47771</id>
<content type='text'>
In investigating [an issue][1] with `panic_implementation` defined in an
executable that's optimized I once again got to rethinking a bit about the
`rustc_std_internal_symbol` attribute as well as weak lang items. We've sort of
been non-stop tweaking these items ever since their inception, and this
continues to the trend.

The crux of the bug was that in the reachability we have a [different branch][2]
for non-library builds which meant that weak lang items (and std internal
symbols) weren't considered reachable, causing them to get eliminiated by
ThinLTO passes. The fix was to basically tweak that branch to consider these
symbols to ensure that they're propagated all the way to the linker.

Along the way I've attempted to erode the distinction between std internal
symbols and weak lang items by having weak lang items automatically configure
fields of `CodegenFnAttrs`. That way most code no longer even considers weak
lang items and they're simply considered normal functions with attributes about
the ABI.

In the end this fixes the final comment of #51342

[1]: https://github.com/rust-lang/rust/issues/51342#issuecomment-414368019
[2]: https://github.com/rust-lang/rust/blob/35bf1ae25799a4e62131159f052e0a3cbd27c960/src/librustc/middle/reachable.rs#L225-L238
</content>
</entry>
<entry>
<title>Switch to bootstrapping from 1.29 beta</title>
<updated>2018-08-01T17:59:08+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2018-08-01T13:37:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=683a3db01fcd00998a36e494ee39209b3105cfb9'/>
<id>urn:sha1:683a3db01fcd00998a36e494ee39209b3105cfb9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement #[alloc_error_handler]</title>
<updated>2018-07-09T21:13:24+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-07-06T13:49:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=239ec7d2dce9c19de16c9ee64addbb834119397c'/>
<id>urn:sha1:239ec7d2dce9c19de16c9ee64addbb834119397c</id>
<content type='text'>
This to-be-stable attribute is equivalent to `#[lang = "oom"]`.
It is required when using the alloc crate without the std crate.
It is called by `handle_alloc_error`, which is in turned called
by "infallible" allocations APIs such as `Vec::push`.
</content>
</entry>
<entry>
<title>Remove `extern` on the `pub fn rust_oom` lang item in libstd, to match ABI of the declaration in liballoc</title>
<updated>2018-07-09T21:13:24+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-07-08T14:07:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=620599e8860b92db1ebbcef3f50671b937aec9cd'/>
<id>urn:sha1:620599e8860b92db1ebbcef3f50671b937aec9cd</id>
<content type='text'>
This turned out to be important on Windows.
Calling `handle_alloc_error(Layout::new::&lt;[u8; 42]&gt;())` 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.
</content>
</entry>
<entry>
<title>Fix inconsequential typo in GlobalAlloc doc example</title>
<updated>2018-06-29T02:12:02+00:00</updated>
<author>
<name>Ixrec</name>
<email>ericrhitchcock@gmail.com</email>
</author>
<published>2018-06-29T02:12:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d6cf1821bffbaa92f07481e24749ac84bce5bfdc'/>
<id>urn:sha1:d6cf1821bffbaa92f07481e24749ac84bce5bfdc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename OOM to allocation error</title>
<updated>2018-06-18T19:41:24+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-06-13T22:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2b789bd0570983e82533f9ed30c80312ac334694'/>
<id>urn:sha1:2b789bd0570983e82533f9ed30c80312ac334694</id>
<content type='text'>
The acronym is not descriptive unless one has seen it before.

* Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle.
* Rename `set_oom_hook` to `set_alloc_error_hook`
* Rename `take_oom_hook` to `take_alloc_error_hook`

Bikeshed: `alloc` v.s. `allocator`, `error` v.s. `failure`
</content>
</entry>
<entry>
<title>Move Unstable Book sections for #[global_allocator] and System to std::alloc docs</title>
<updated>2018-06-11T20:48:57+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-05-31T18:22:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a24924f6834ea6e5bd813d006a12aef8e5dbd5e9'/>
<id>urn:sha1:a24924f6834ea6e5bd813d006a12aef8e5dbd5e9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Stabilize the `System` allocator</title>
<updated>2018-06-11T20:48:39+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-05-31T17:16:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8111717da1d5854495b001be49346985ac3f208d'/>
<id>urn:sha1:8111717da1d5854495b001be49346985ac3f208d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move set_oom_hook and take_oom_hook to a dedicated tracking issue</title>
<updated>2018-06-11T20:48:39+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-05-31T17:15:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=90d19728fc93157465c1a586dbd35c6dc4cf78c9'/>
<id>urn:sha1:90d19728fc93157465c1a586dbd35c6dc4cf78c9</id>
<content type='text'>
</content>
</entry>
</feed>
