diff options
| author | bors <bors@rust-lang.org> | 2017-11-16 06:10:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-16 06:10:36 +0000 |
| commit | 1410d5604042b739f02f9ec0f2a6c5125c797d52 (patch) | |
| tree | 5e945d090d07c9abff1dbb8ce36193ed5ee32f15 /src/test/incremental/thinlto | |
| parent | 8385fc062dbb57c32d96d16e59d244c168103946 (diff) | |
| parent | ac48348db85d0ce9efdc450ab52837dcfc42a932 (diff) | |
| download | rust-1410d5604042b739f02f9ec0f2a6c5125c797d52.tar.gz rust-1410d5604042b739f02f9ec0f2a6c5125c797d52.zip | |
Auto merge of #45920 - sunfishcode:trap-on-unreachable, r=Zoxc
Enable TrapUnreachable in LLVM. This patch enables LLVM's TrapUnreachable flag, which tells it to translate `unreachable` instructions into hardware trap instructions, rather than allowing control flow to "fall through" into whatever code happens to follow it in memory. This follows up on https://github.com/rust-lang/rust/issues/28728#issuecomment-332581533. For example, for @zackw's testcase [here](https://github.com/rust-lang/rust/issues/42009#issue-228745924), the output function contains a `ud2` instead of no code, so it won't "fall through" into whatever happens to be next in memory. (I'm also working on the problem of LLVM optimizing away infinite loops, but the patch here is useful independently.) I tested this patch on a few different codebases, and the code size increase ranged from 0.0% to 0.1%.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions
