Fixes#1064
This ensures that we set the error code properly when a panic unwinds
past `main`.
I'm not sure what the best way to write a test for this is
Support unwinding after a panic
Fixes#658
This commit adds support for unwinding after a panic. It requires a
companion rustc PR to be merged, in order for the necessary hooks to
work properly.
Currently implemented:
* Selecting between unwind/abort mode based on the rustc Session
* Properly popping off stack frames, unwinding back the caller
* Running 'unwind' blocks in Mir terminators
Not yet implemented:
* 'Abort' terminators
This PR was getting fairly large, so I decided to open it for review without
implementing 'Abort' terminator support. This could either be added on
to this PR, or merged separately.
I've a test to exercise several different aspects of unwind panicking. Ideally, we would run Miri against the libstd panic tests, but I haven't yet figured out how to do that.
This depends on https://github.com/rust-lang/rust/pull/60026
Fixes#658
This commit adds support for unwinding after a panic. It requires a
companion rustc PR to be merged, in order for the necessary hooks to
work properly.
Currently implemented:
* Selecting between unwind/abort mode based on the rustc Session
* Properly popping off stack frames, unwinding back the caller
* Running 'unwind' blocks in Mir terminators
Not yet implemented:
* 'Abort' terminators
This PR was getting fairly large, so I decided to open it for review without
implementing 'Abort' terminator support. This could either be added on
to this PR, or merged separately.
Fix unchecked memory access for files
This PR takes care of two problems:
- It uses `Memory::(read|write)_bytes` to guarantee that memory accesses are checked (Fixes: https://github.com/rust-lang/miri/issues/1007)
- It removes the `(get|remove)_handle_and` methods which were a little bit cumbersome to use. In particular `remove_handle_and`, because we were using it to avoid borrowing issues before the `Evaluator::memory` field was public.
@RalfJung @oli-obk
Implment intrinsics::copysignf32 and intrinsics::copysignf64
Tries to implment `intrinsics::copysignf32` and `intrinsics::copysignf64` for fixing Issue #1046 .