diff options
| author | bors <bors@rust-lang.org> | 2017-12-24 02:42:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-12-24 02:42:15 +0000 |
| commit | 51b47dc4a1af3260738aa7c5d4e31e8d77c0c0b6 (patch) | |
| tree | 8c963bcb1eeb6fcacfbdc6697e82cebacc10cee1 /src/rustllvm/RustWrapper.cpp | |
| parent | 8d4da4f4c4f097e6a95264cc527da64bfc133b0f (diff) | |
| parent | 4910ed2b1e12cfb9518ea1e1be0ec144fa0d95a6 (diff) | |
| download | rust-51b47dc4a1af3260738aa7c5d4e31e8d77c0c0b6.tar.gz rust-51b47dc4a1af3260738aa7c5d4e31e8d77c0c0b6.zip | |
Auto merge of #46833 - diwic:7c-abort-ffi, r=arielb1
Prevent unwinding past FFI boundaries
Second attempt to write a patch to solve this.
r? @nikomatsakis
~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED
Other issues:
* llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library...
* ~~Mir inlining is a stub currently.~~ FIXED (no-op)
Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
