]> git.lizzy.rs Git - rust.git/commit
rustc: Switch `extern` functions to abort by default on panic
authorAlex Crichton <alex@alexcrichton.com>
Thu, 15 Nov 2018 14:17:58 +0000 (06:17 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 12 Dec 2018 16:07:28 +0000 (08:07 -0800)
commit1091eee65b91a9968f2a0b2f0c7d6e8e27d8d033
treea39396a99d4ec12f53c2a622854bdb993d5b48eb
parentbd47d6825bf4090517549d33cfef10d3300b4a75
rustc: Switch `extern` functions to abort by default on panic

This was intended to land way back in 1.24, but it was backed out due to
breakage which has long since been fixed. An unstable `#[unwind]`
attribute can be used to tweak the behavior here, but this is currently
simply switching rustc's internal default to abort-by-default if an
`extern` function panics, making our codegen sound primarily (as
currently you can produce UB with safe code)

Closes #52652
src/librustc_codegen_llvm/attributes.rs
src/librustc_codegen_llvm/callee.rs
src/librustc_codegen_llvm/context.rs
src/librustc_codegen_llvm/declare.rs
src/librustc_codegen_llvm/intrinsic.rs
src/librustc_codegen_llvm/mono_item.rs
src/librustc_mir/build/mod.rs
src/test/codegen/nounwind-extern.rs [new file with mode: 0644]
src/test/run-pass/abort-on-c-abi.rs
src/test/run-pass/extern/extern-call-deep.rs