<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/sys/common/unwind, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2016-05-09T15:22:36+00:00</updated>
<entry>
<title>rustc: Implement custom panic runtimes</title>
<updated>2016-05-09T15:22:36+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2016-04-08T23:18:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0ec321f7b541fcbfbf20286beb497e6d9d3352b2'/>
<id>urn:sha1:0ec321f7b541fcbfbf20286beb497e6d9d3352b2</id>
<content type='text'>
This commit is an implementation of [RFC 1513] which allows applications to
alter the behavior of panics at compile time. A new compiler flag, `-C panic`,
is added and accepts the values `unwind` or `panic`, with the default being
`unwind`. This model affects how code is generated for the local crate, skipping
generation of landing pads with `-C panic=abort`.

[RFC 1513]: https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md

Panic implementations are then provided by crates tagged with
`#![panic_runtime]` and lazily required by crates with
`#![needs_panic_runtime]`. The panic strategy (`-C panic` value) of the panic
runtime must match the final product, and if the panic strategy is not `abort`
then the entire DAG must have the same panic strategy.

With the `-C panic=abort` strategy, users can expect a stable method to disable
generation of landing pads, improving optimization in niche scenarios,
decreasing compile time, and decreasing output binary size. With the `-C
panic=unwind` strategy users can expect the existing ability to isolate failure
in Rust code from the outside world.

Organizationally, this commit dismantles the `sys_common::unwind` module in
favor of some bits moving part of it to `libpanic_unwind` and the rest into the
`panicking` module in libstd. The custom panic runtime support is pretty similar
to the custom allocator support with the only major difference being how the
panic runtime is injected (takes the `-C panic` flag into account).
</content>
</entry>
<entry>
<title>Fix backtraces on ARM EHABI.</title>
<updated>2016-04-05T04:15:37+00:00</updated>
<author>
<name>Timon Van Overveldt</name>
<email>timonvo@gmail.com</email>
</author>
<published>2016-03-19T21:53:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e41885bd813a1628b6ca54058ab9595e9957c67'/>
<id>urn:sha1:6e41885bd813a1628b6ca54058ab9595e9957c67</id>
<content type='text'>
Before this patch, our rust_eh_personality_catch routine would cut
backtracing short at the __rust_try function, due to it not handling
the _US_FORCE_UNWIND bit properly, which is passed by libunwind
implementations on ARM EHABI.

Examples of where the _US_FORCE_UNWIND bit is passed to the PR:
- GCC's libunwind: https://github.com/gcc-mirror/gcc/blob/f1717362de1e56fe1ffab540289d7d0c6ed48b20/libgcc/unwind-arm-common.inc#L590
- LLVM's libunwind: https://github.com/llvm-mirror/libunwind/blob/61278584b5c84c422ff5da10f46c3235c54636c9/src/UnwindLevel1-gcc-ext.c#L153
</content>
</entry>
<entry>
<title>Register new snapshots</title>
<updated>2016-02-23T15:31:16+00:00</updated>
<author>
<name>Aaron Turon</name>
<email>aturon@mozilla.com</email>
</author>
<published>2016-02-20T00:08:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a92ee0f664c84545c3cba70644472ec3df23c1ee'/>
<id>urn:sha1:a92ee0f664c84545c3cba70644472ec3df23c1ee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bootstrap: Add directives to not double-link libs</title>
<updated>2016-02-11T19:12:32+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2016-01-21T23:36:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=eac0a8bc3070e45047fff57e7b024a059289a36d'/>
<id>urn:sha1:eac0a8bc3070e45047fff57e7b024a059289a36d</id>
<content type='text'>
Have all Cargo-built crates pass `--cfg cargobuild` and then add appropriate
`#[cfg]` definitions to all crates to avoid linking anything if this is passed.
This should help allow libstd to compile with both the makefiles and with Cargo.
</content>
</entry>
<entry>
<title>trans: Reimplement unwinding on MSVC</title>
<updated>2016-01-30T00:25:20+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-10-24T01:18:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3e9589c0f43af69544b042f50b886005613540f2'/>
<id>urn:sha1:3e9589c0f43af69544b042f50b886005613540f2</id>
<content type='text'>
This commit transitions the compiler to using the new exception handling
instructions in LLVM for implementing unwinding for MSVC. This affects both 32
and 64-bit MSVC as they're both now using SEH-based strategies. In terms of
standard library support, lots more details about how SEH unwinding is
implemented can be found in the commits.

In terms of trans, this change necessitated a few modifications:

* Branches were added to detect when the old landingpad instruction is used or
  the new cleanuppad instruction is used to `trans::cleanup`.
* The return value from `cleanuppad` is not stored in an `alloca` (because it
  cannot be).
* Each block in trans now has an `Option&lt;LandingPad&gt;` instead of `is_lpad: bool`
  for indicating whether it's in a landing pad or not. The new exception
  handling intrinsics require that on MSVC each `call` inside of a landing pad
  is annotated with which landing pad that it's in. This change to the basic
  block means that whenever a `call` or `invoke` instruction is generated we
  know whether to annotate it as part of a cleanuppad or not.
* Lots of modifications were made to the instruction builders to construct the
  new instructions as well as pass the tagging information for the call/invoke
  instructions.
* The translation of the `try` intrinsics for MSVC has been overhauled to use
  the new `catchpad` instruction. The filter function is now also a
  rustc-generated function instead of a purely libstd-defined function. The
  libstd definition still exists, it just has a stable ABI across architectures
  and leaves some of the really weird implementation details to the compiler
  (e.g. the `localescape` and `localrecover` intrinsics).
</content>
</entry>
<entry>
<title>Add std::panic::propagate</title>
<updated>2016-01-07T00:06:11+00:00</updated>
<author>
<name>Steven Fackler</name>
<email>sfackler@gmail.com</email>
</author>
<published>2015-12-25T19:00:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=022c9c70c48581b8caa17895b447a941a9750076'/>
<id>urn:sha1:022c9c70c48581b8caa17895b447a941a9750076</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Register new snapshots</title>
<updated>2015-12-21T17:26:21+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-12-11T21:07:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cd1848a1a60f40f25019e455b1050efd69707604'/>
<id>urn:sha1:cd1848a1a60f40f25019e455b1050efd69707604</id>
<content type='text'>
Lots of cruft to remove!
</content>
</entry>
<entry>
<title>Fix buildbot failures</title>
<updated>2015-11-18T18:16:20+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2015-11-18T18:16:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=64b90f81c3ec2cf5564ed8456d836516491b9d01'/>
<id>urn:sha1:64b90f81c3ec2cf5564ed8456d836516491b9d01</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add missing annotations and some tests</title>
<updated>2015-11-17T22:24:21+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2015-11-16T16:54:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2'/>
<id>urn:sha1:7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: Migrate to the new libc</title>
<updated>2015-11-10T06:55:50+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-11-03T00:23:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11'/>
<id>urn:sha1:3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11</id>
<content type='text'>
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself
* Update all references to use `libc` as a result.
* Update all references to the new flat namespace.
* Moves all windows bindings into sys::c
</content>
</entry>
</feed>
