diff options
| author | bors <bors@rust-lang.org> | 2021-05-28 08:49:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-28 08:49:48 +0000 |
| commit | ce0d64e03ef9875e0935bb60e989542b7ec29579 (patch) | |
| tree | 759e3bb5281ff07fc4fbf0d182a44afb9471b970 /compiler/rustc_codegen_llvm/src | |
| parent | 18135ec85be45df013ecd0d1eb4a49128d043e20 (diff) | |
| parent | f6348f1924626ea15bc6c4e6be3f525f891767e3 (diff) | |
| download | rust-ce0d64e03ef9875e0935bb60e989542b7ec29579.tar.gz rust-ce0d64e03ef9875e0935bb60e989542b7ec29579.zip | |
Auto merge of #85546 - hyd-dev:unwind, r=RalfJung
const-eval: disallow unwinding across functions that `!fn_can_unwind()` Following https://github.com/rust-lang/miri/pull/1776#discussion_r633074343, so r? `@RalfJung` This PR turns `unwind` in `StackPopCleanup::Goto` into a new enum `StackPopUnwind`, with a `NotAllowed` variant to indicate that unwinding is not allowed. This variant is chosen based on `rustc_middle::ty::layout::fn_can_unwind()` in `eval_fn_call()` when pushing the frame. A check is added in `unwind_to_block()` to report UB if unwinding happens across a `StackPopUnwind::NotAllowed` frame. Tested with Miri `HEAD` with [minor changes](https://github.com/rust-lang/miri/compare/HEAD..9cf3c7f0d86325a586fbcbf2acdc9232b861f1d8) and the rust-lang/miri#1776 branch with [these changes](https://github.com/rust-lang/miri/compare/d866c1c52f48bf562720383455b75c257bb1ad92..626638fbfe2fff34648dda29a34d59db498a6e52).
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
