Commit Graph

217 Commits

Author SHA1 Message Date
Ben Kimock
f3f7e083dc Print spans where tags are created and invalidated 2022-04-30 10:25:51 -04:00
David Tolnay
d35c82f79f
Resolve clippy::useless_conversion
error: useless conversion to the same type: `rustc_const_eval::interpret::Pointer<std::option::Option<machine::Tag>>`
       --> src/helpers.rs:668:36
        |
    668 |                 this.get_ptr_alloc(ptr.offset(len, this)?.into(), size1, Align::ONE)?.unwrap(); // not a ZST, so we will get a result
        |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ptr.offset(len, this)?`
        |
        = note: `-D clippy::useless-conversion` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `rustc_const_eval::interpret::Pointer<std::option::Option<machine::Tag>>`
       --> src/helpers.rs:678:29
        |
    678 |         this.read_bytes_ptr(ptr.into(), len)
        |                             ^^^^^^^^^^ help: consider removing `.into()`: `ptr`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `rustc_const_eval::interpret::Pointer<std::option::Option<machine::Tag>>`
       --> src/helpers.rs:690:44
        |
    690 |             let alloc = this.get_ptr_alloc(ptr.into(), size2, align2)?.unwrap(); // not a ZST, so we will get a result
        |                                            ^^^^^^^^^^ help: consider removing `.into()`: `ptr`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `rustc_const_eval::interpret::OpTy<machine::Tag>`
       --> src/shims/intrinsics.rs:778:42
        |
    778 |                         .read_immediate(&this.operand_index(index, i)?.into())?
        |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `this.operand_index(index, i)?`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `u32`
        --> src/shims/posix/fs.rs:1171:26
         |
    1171 |             builder.mode(mode.into());
         |                          ^^^^^^^^^^^ help: consider removing `.into()`: `mode`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `std::ffi::OsString`
      --> src/shims/env.rs:67:53
       |
    67 |                     ecx.machine.env_vars.map.insert(OsString::from(name), var_ptr);
       |                                                     ^^^^^^^^^^^^^^^^^^^^ help: consider removing `OsString::from()`: `name`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `rustc_const_eval::interpret::Scalar<machine::Tag>`
       --> src/shims/tls.rs:102:44
        |
    102 |                 Ok(value.unwrap_or_else(|| Scalar::null_ptr(cx).into()))
        |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `Scalar::null_ptr(cx)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

    error: useless conversion to the same type: `u32`
      --> src/thread.rs:73:26
       |
    73 |         Scalar::from_u32(u32::try_from(self.0).unwrap())
       |                          ^^^^^^^^^^^^^^^^^^^^^
       |
       = help: consider removing `u32::try_from()`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
2022-04-29 16:02:11 -07:00
David Tolnay
1986f90c6a
Resolve clippy::single_char_pattern
error: single-character string constant used as pattern
       --> src/helpers.rs:805:36
        |
    805 |         .map(|crates| crates.split(",").map(|krate| krate.to_string()).collect::<Vec<_>>())
        |                                    ^^^ help: try using a `char` instead: `','`
        |
        = note: `-D clippy::single-char-pattern` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
2022-04-29 15:58:34 -07:00
David Tolnay
2f32221fe4
Resolve clippy::redundant_field_names
error: redundant field names in struct initialization
       --> src/helpers.rs:199:34
        |
    199 |         let place = mir::Place { local: local, projection: List::empty() };
        |                                  ^^^^^^^^^^^^ help: replace it with: `local`
        |
        = note: `-D clippy::redundant-field-names` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names

    error: redundant field names in struct initialization
       --> src/thread.rs:238:13
        |
    238 |             threads: threads,
        |             ^^^^^^^^^^^^^^^^ help: replace it with: `threads`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
2022-04-29 15:57:16 -07:00
David Tolnay
519755a823
Resolve clippy::needless_return
error: unneeded `return` statement
       --> src/helpers.rs:734:13
        |
    734 |             return Ok(());
        |             ^^^^^^^^^^^^^^ help: remove `return`: `Ok(())`
        |
        = note: `-D clippy::needless-return` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/range_map.rs:113:9
        |
    113 |         return true;
        |         ^^^^^^^^^^^^ help: remove `return`: `true`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/shims/posix/fs.rs:648:25
        |
    648 |                 None => return this.handle_not_found(),
        |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `this.handle_not_found()`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
      --> src/shims/panic.rs:62:9
       |
    62 |         return Ok(());
       |         ^^^^^^^^^^^^^^ help: remove `return`: `Ok(())`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/shims/panic.rs:115:9
        |
    115 |         return Ok(());
        |         ^^^^^^^^^^^^^^ help: remove `return`: `Ok(())`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/thread.rs:477:9
        |
    477 |         return free_tls_statics;
        |         ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return`: `free_tls_statics`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return

    error: unneeded `return` statement
       --> src/thread.rs:459:17
        |
    459 |                 return false;
        |                 ^^^^^^^^^^^^^ help: remove `return`: `false`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
2022-04-29 15:53:48 -07:00
David Tolnay
6e2297fde0
Resolve clippy::needless_question_mark
error: question mark operator is useless here
      --> src/helpers.rs:86:16
       |
    86 |         return Ok(const_val.check_init()?);
       |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `const_val.check_init()`
       |
       = note: `-D clippy::needless-question-mark` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
2022-04-29 15:48:01 -07:00
David Tolnay
2ca7f3b45d
Resolve clippy::needless_borrow
error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/data_race.rs:565:34
        |
    565 |         this.validate_atomic_rmw(&place, atomic)?;
        |                                  ^^^^^^ help: change this to: `place`
        |
        = note: `-D clippy::needless-borrow` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/data_race.rs:1413:27
         |
    1413 |         clocks.clock.join(&lock);
         |                           ^^^^^ help: change this to: `lock`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/helpers.rs:326:51
        |
    326 |                         .size_and_align_of_mplace(&place)?
        |                                                   ^^^^^^ help: change this to: `place`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/helpers.rs:365:17
        |
    365 |                 &self.ecx
        |                 ^^^^^^^^^ help: change this to: `self.ecx`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/helpers.rs:634:47
        |
    634 |         let seconds_place = this.mplace_field(&tp, 0)?;
        |                                               ^^^ help: change this to: `tp`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/helpers.rs:637:51
        |
    637 |         let nanoseconds_place = this.mplace_field(&tp, 1)?;
        |                                                   ^^^ help: change this to: `tp`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/machine.rs:547:73
        |
    547 |         let link_name = match ecx.tcx.sess.first_attr_value_str_by_name(&attrs, sym::link_name) {
        |                                                                         ^^^^^^ help: change this to: `attrs`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/machine.rs:576:56
        |
    576 |             Some(data_race::AllocExtra::new_allocation(&data_race, alloc.size(), kind))
        |                                                        ^^^^^^^^^^ help: change this to: `data_race`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/foreign_items.rs:241:43
        |
    241 |             .first_attr_value_str_by_name(&attrs, sym::link_name)
        |                                           ^^^^^^ help: change this to: `attrs`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/intrinsics.rs:778:61
        |
    778 |                         .read_immediate(&this.operand_index(&index, i)?.into())?
        |                                                             ^^^^^^ help: change this to: `index`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/shims/intrinsics.rs:1195:44
         |
    1195 |                 this.write_immediate(*old, &dest)?; // old value is returned
         |                                            ^^^^^ help: change this to: `dest`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/shims/intrinsics.rs:1200:44
         |
    1200 |                 this.write_immediate(*old, &dest)?; // old value is returned
         |                                            ^^^^^ help: change this to: `dest`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
      --> src/shims/posix/fs.rs:54:12
       |
    54 |         Ok(&self)
       |            ^^^^^ help: change this to: `self`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/posix/fs.rs:654:49
        |
    654 |                 let io_result = maybe_sync_file(&file, *writable, File::sync_all);
        |                                                 ^^^^^ help: change this to: `file`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/posix/fs.rs:746:52
        |
    746 |                 file_descriptor.write(communicate, &bytes)?.map(|c| i64::try_from(c).unwrap());
        |                                                    ^^^^^^ help: change this to: `bytes`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/shims/posix/fs.rs:1494:45
         |
    1494 |             let io_result = maybe_sync_file(&file, *writable, File::sync_all);
         |                                             ^^^^^ help: change this to: `file`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/shims/posix/fs.rs:1516:45
         |
    1516 |             let io_result = maybe_sync_file(&file, *writable, File::sync_data);
         |                                             ^^^^^ help: change this to: `file`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/shims/posix/fs.rs:1561:45
         |
    1561 |             let io_result = maybe_sync_file(&file, *writable, File::sync_data);
         |                                             ^^^^^ help: change this to: `file`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/env.rs:232:65
        |
    232 |             let var_ptr = alloc_env_var_as_c_str(&name, &value, &mut this)?;
        |                                                                 ^^^^^^^^^ help: change this to: `this`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/env.rs:277:68
        |
    277 |             let var_ptr = alloc_env_var_as_wide_str(&name, &value, &mut this)?;
        |                                                                    ^^^^^^^^^ help: change this to: `this`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/env.rs:328:37
        |
    328 |         let buf = this.read_pointer(&buf_op)?;
        |                                     ^^^^^^^ help: change this to: `buf_op`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

    error: this expression creates a reference which is immediately dereferenced by the compiler
       --> src/shims/env.rs:329:37
        |
    329 |         let size = this.read_scalar(&size_op)?.to_machine_usize(&*this.tcx)?;
        |                                     ^^^^^^^^ help: change this to: `size_op`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
2022-04-29 15:43:14 -07:00
David Tolnay
16c2400737
Resolve clippy::mem_replace_with_default
error: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`
      --> src/helpers.rs:54:29
       |
    54 |                 for item in mem::replace(&mut items, Default::default()).iter() {
       |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut items)`
       |
       = note: `-D clippy::mem-replace-with-default` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default
2022-04-29 15:39:56 -07:00
David Tolnay
1fa63f1e9b
Resolve clippy::extra_unused_lifetimes
error: this lifetime isn't used in the function definition
      --> src/helpers.rs:46:20
       |
    46 | fn try_resolve_did<'mir, 'tcx>(tcx: TyCtxt<'tcx>, path: &[&str]) -> Option<DefId> {
       |                    ^^^^
       |
       = note: `-D clippy::extra-unused-lifetimes` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes

    error: this lifetime isn't used in the function definition
      --> src/shims/posix/fs.rs:49:12
       |
    49 |     fn dup<'tcx>(&mut self) -> io::Result<Box<dyn FileDescriptor>>;
       |            ^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes

    error: this lifetime isn't used in the function definition
      --> src/shims/os_str.rs:81:41
       |
    81 |         pub fn u16vec_to_osstring<'tcx, 'a>(u16_vec: Vec<u16>) -> InterpResult<'tcx, OsString> {
       |                                         ^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes

    error: this lifetime isn't used in the function definition
      --> src/thread.rs:72:26
       |
    72 |     pub fn to_u32_scalar<'tcx>(&self) -> Scalar<Tag> {
       |                          ^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
2022-04-29 15:38:12 -07:00
David Tolnay
0389745203
Resolve clippy::assign_op_pattern
error: manual implementation of an assign operation
       --> src/helpers.rs:673:17
        |
    673 |                 len = len + size1;
        |                 ^^^^^^^^^^^^^^^^^ help: replace it with: `len += size1`
        |
        = note: `-D clippy::assign-op-pattern` implied by `-D clippy::all`
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
2022-04-29 15:36:58 -07:00
Ralf Jung
f1023fbdc9 avoid into_pointer_or_addr and into_parts in visit_freeze_sensitive 2022-04-20 08:40:19 -04:00
Ralf Jung
db2c4b6dfa implement strerror_r 2022-04-16 22:54:38 -04:00
Ralf Jung
855af088b8 remove no longer needed imports 2022-04-09 11:32:49 -04:00
Ralf Jung
6e1f3cd8ff adjust for MemoryExtra being merged into Machine 2022-04-05 11:11:53 -04:00
Ralf Jung
830cc58f8a rustup 2022-04-03 20:00:03 -04:00
Ben Kimock
65125df1cd Consider the cargo workspace when checking if a frame is local 2022-03-18 16:28:13 -04:00
Ralf Jung
bfed3c4f0d implement simd bitmask intrinsics 2022-03-17 13:08:01 -04:00
Ralf Jung
47f8218d0d add write_int_fields to replace write_packed_immediates
for stat, lookup fields by name
2022-03-12 12:17:23 -05:00
Ralf Jung
4bd6bc9098 use dirent64_layout and field projections for writing dirent info 2022-03-12 12:03:33 -05:00
Ralf Jung
27d5b846ee rustup 2022-03-12 09:46:10 -05:00
Ralf Jung
6d3506adef fs: add and test for DirectoryNotEmpty error variant 2022-03-07 18:30:12 -05:00
Ralf Jung
f672282bf2 factor SIMD bool handling into helper functions 2022-03-01 18:15:39 -05:00
Ralf Jung
ee6198fb98 rustup 2022-01-09 14:50:03 +01:00
Ralf Jung
a312297973 adjust for FnAbi changes 2021-12-24 12:02:22 +01:00
hyd-dev
3fedc7b249
rustc_target::abi::LayoutOf -> rustc_middle::ty::layout::LayoutOf 2021-09-06 23:05:48 +08:00
Frank Steffahn
c79f6dd5a0 Fix a typo “an”→“a” 2021-08-22 18:07:01 +02:00
Smit Soni
a1cabac727 Fix use of deprecated check_no_isolation in posix fs ops
Update posix fs shims to use new API `reject_in_isolation`, which
allows rejection with error code instead of always forcing abort.
Error code chosen for each op is the most appropriate one from the
list in corresponding syscall's manual.

Updated helper APIs to not use quotes (`) around input name while
preparing the message. This allows callers to pass multi-word string
like -- "`read` from stdin".
2021-07-20 08:23:51 -07:00
Ralf Jung
a1233a721d adjust Miri to Pointer type overhaul 2021-07-16 10:10:12 +02:00
Ralf Jung
0341b8ac84 fmt: set force_multiline_blocks=true 2021-07-11 14:18:44 +02:00
Smitty
d19376985d Make work after mir-alloc-oom 2021-07-04 09:59:55 -04:00
hyd-dev
76fe48543c
Update for TyCtxt::crates() change 2021-07-02 16:08:27 +08:00
hyd-dev
9011524454
Remove strip_linker_suffix 2021-06-15 01:16:38 +08:00
hyd-dev
a67a65359f
Only pass Symbol to emulate_foreign_item_by_name 2021-06-15 00:43:15 +08:00
hyd-dev
ce7040075a
Disallow #[no_mangle]/#[export_name = ...] functions that have the same symbol name as built-in shims 2021-06-11 15:18:47 +08:00
bors
e5c3af6f51 Auto merge of #1818 - landaire:feature/panic-on-unsupported-syscalls, r=RalfJung
Add support for panicking in the emulated application when unsupported functionality is encountered

This PR fixes #1807 and allows an optional flag to be specified to panic when an unsupported syscall is encountered. In essence, instead of bubbling up an error in the context of the Miri application Miri will panic within the context of the *emulated* application. This feature is desired to allow CI pipelines to determine if a Miri failure is unsupported functionality or actual UB. Please read [this comment](https://github.com/rust-lang/miri/issues/1807#issuecomment-845425076) for the rationale behind this change.

Note: this change does not cover all cases where unsupported functionality errors may be raised. If you search the repo for `throw_unsup_format!` there are many cases that I think are less likely to occur and may still be problematic for some folks.

TODO:

- [x] README documentation on this new flag
- [x] Add tests
2021-06-09 18:09:06 +00:00
Ralf Jung
a38f02c44c isolated operations return EPERM; tweak isolation hint 2021-06-09 18:24:59 +02:00
Smit Soni
ba64f485c8 Fix parameter of io error helper function
`set_last_error_from_io_error` works with only the error kind, and
discards the payload. Fix its signature to make it explicit.
2021-06-09 06:28:35 -07:00
Smit Soni
892f706ce5 Add a support to execute isolated op without halting
In user interface, added a new flag `-Zmiri-isolation-error` which
takes one of the four values -- hide, warn, warn-nobacktrace, and
abort. This option can be used to configure Miri to either abort or
return an error code upon executing isolated op. If not aborted, Miri
prints a warning, whose verbosity can be configured using this flag.

In implementation, added a new enum `IsolatedOp` to capture all the
settings related to ops requiring communication with the
host. Old `communicate` flag in both miri configs and machine
stats is replaced with a new helper function `communicate()` which
checks `isolated_op` internally.

Added a new helper function `reject_in_isolation` which can be called
by shims to reject ops according to the reject_with settings. Use miri
specific diagnostics function `report_msg` to print backtrace in the
warning. Update it to take an enum value instead of a bool, indicating
the level of diagnostics.

Updated shims related to current dir to use the new APIs. Added a new
test for current dir ops in isolation without halting machine.
2021-06-09 05:50:52 -07:00
Lander Brandt
ae237098f8 Add support for panicking in the emulated application when unsupported syscalls are encountered 2021-06-07 15:21:53 -07:00
hyd-dev
3871c493b2
in_std -> frame_in_std 2021-06-06 11:21:20 +08:00
hyd-dev
545101040d
Don't unwrap() in in_std() 2021-06-06 11:12:13 +08:00
hyd-dev
879000b133
Detect std by checking if the crate defines #[lang = "start"] rather than string comparison 2021-06-06 11:12:05 +08:00
bors
28717a0e90 Auto merge of #1776 - hyd-dev:1170, r=RalfJung
Implement calls to exported symbols (#1170)

Closes #1170.
2021-06-03 15:59:56 +00:00
hyd-dev
647ee17b40
original_crate_name -> crate_name 2021-06-03 10:22:31 +08:00
hyd-dev
382295cd47
Move check_abi() into EvalContextExt 2021-05-31 11:15:31 +08:00
hyd-dev
71f4140550
Add -Zmiri-disable-abi-check 2021-05-31 11:14:23 +08:00
Ralf Jung
801a1744cd update for Memory API changes 2021-05-19 15:27:58 +02:00
Ralf Jung
4f171d7fe3 stop relying on c_str/wide_str helpers in rustc 2021-05-17 14:31:59 +02:00
Ralf Jung
4e231bab5e format much of Miri 2021-05-16 11:48:28 +02:00
Ralf Jung
aac6e2ad3e fix checking os_family 2021-05-03 09:57:13 +02:00