Commit Graph

4828 Commits

Author SHA1 Message Date
Ralf Jung
80929e17ae add test for unused ill-formed constant
also use better span in TopFrameInfo
2020-08-13 08:33:36 +02:00
bors
a44bb290f1 Auto merge of #1507 - rust-lang:get_static, r=RalfJung
Bump for rustc changes

rustc-side: https://github.com/rust-lang/rust/pull/75394
2020-08-12 07:19:59 +00:00
Ralf Jung
2f68a1f5b5 rustup 2020-08-12 09:19:40 +02:00
Oliver Scherer
94f13efefd Bump for rustc changes 2020-08-11 11:37:29 +02:00
bors
50f3796597 Auto merge of #1506 - RalfJung:test-isolation, r=RalfJung
make sure opening a file fails with isolation enabled
2020-08-10 08:24:56 +00:00
Ralf Jung
da2260db44 make sure opening a file fails with isolation enabled 2020-08-10 10:10:08 +02:00
bors
1edd231065 Auto merge of #1503 - RalfJung:post-mono, r=RalfJung
accept some post-monomorphization errors

For https://github.com/rust-lang/miri/issues/1382, we also need to allow `ReferencedConstant` post-monomorphization errors. The other post-monomorphization errors should still be impossible to trigger in Miri. The fix is not complete though without https://github.com/rust-lang/rust/pull/75339.
2020-08-10 07:04:20 +00:00
Ralf Jung
5ea5e9fc2c accept ReferencedConstant errors in Miri (can happen post-monomorphization) 2020-08-10 09:02:45 +02:00
bors
52c7b8ec11 Auto merge of #1502 - RalfJung:isolation, r=RalfJung
fs: move isolation handling to inside trait
2020-08-08 13:25:25 +00:00
Ralf Jung
5657f08bea fs: move isolation handling to inside trait 2020-08-08 15:24:30 +02:00
bors
eaf5d32ac7 Auto merge of #1501 - samrat:fix-fs-error-handling, r=RalfJung
Bubble up errors from FileDescriptor::as_file_handle

Instead of indicating incorrectly that a handle was not found, return the error from `as_file_handle` indicating the operation is not supported on the FD.

Addresses some comments in #1495
2020-08-08 12:28:08 +00:00
bors
302ccf4ef6 Auto merge of #1500 - RalfJung:rustup, r=RalfJung
rustup

Adjust for https://github.com/rust-lang/rust/pull/74932.
Blocked on https://github.com/rust-lang/rust/pull/75282.
2020-08-08 12:05:31 +00:00
Ralf Jung
07a4383ac8 rustup 2020-08-08 14:05:11 +02:00
Samrat Man Singh
1069f6b174 Fix handling of as_file_handle error for fullfsync 2020-08-08 17:28:41 +05:30
Samrat Man Singh
045bcab1eb Add FIXME's for dup and other syscalls to support stdin/out/err 2020-08-08 15:08:29 +05:30
Samrat Man Singh
773dfb31f0 Bubble up error from FileDescriptor::as_file_handle
...instead of handle_not_found
2020-08-08 14:42:50 +05:30
bors
cf633d0e89 Auto merge of #1498 - RalfJung:rustup, r=RalfJung
rustup

The allocator API changed *again*, adjust our test.
2020-08-05 11:39:07 +00:00
Ralf Jung
422113a491 rustup 2020-08-05 13:38:15 +02:00
bors
0cf3e9fddc Auto merge of #1497 - samrat:posix-fs-refactor, r=oli-obk
Add `impl FileDescriptor` for stdin, stdout, stderr

- Use `FileDescriptor::read` for stdin reads
- Use `FileDescriptor::write` for stdout/err writes
- Handle stdout/err reads in `FileDescriptor::read`

The `FileDescriptor` trait was added in PR #1495

Closes #1486
2020-08-04 15:40:56 +00:00
Samrat Man Singh
bdef57ea45 Flush to stdout from FileDescriptor::write for Stdout
Also, remove unnecessary `-Zmiri-disable-isolation` in test
2020-08-04 20:40:48 +05:30
Samrat Man Singh
bea7113eb8 Add impl FileDescriptor for stdin, stdout, stderr
- Use `FileDescriptor::read` for stdin reads
- Use `FileDescriptor::write` for stdout/err writes
- Handle stdout/err reads in `FileDescriptor::read`
2020-08-04 01:14:52 +05:30
bors
69d050fb6b Auto merge of #1495 - samrat:fd-trait, r=oli-obk
Add FileDescriptor trait to abstract fn's on File's and Stdin,Stdout,Stderr

Related issue: #1486

Instead of mapping FDs to `FileHandle`, map them to a `FileDescriptor` trait object. The goal is to eventually have both `FileHandle` as well as `Stdin`, `Stdout` and `Stderr` implement this trait so that syscalls involving FDs can handle both `File`s as well as the standard IO streams.

This PR adds the `FileDescriptor` trait and an `impl` for `FileHandle`. I'll open a separate PR for implementing the trait for the standard IO streams.
2020-08-03 15:50:30 +00:00
Samrat Man Singh
79e066fc95 Remove unnecessary clone() on writable 2020-08-03 20:39:09 +05:30
bors
2d2820dc77 Auto merge of #1496 - RalfJung:rustup, r=RalfJung
rustup; inner_deref has been stabilized

miri and cargo-miri now use no nightly features (except for miri's using `rustc_private`, of course) :D
2020-08-03 12:25:11 +00:00
Ralf Jung
cda255cfb4 rustup; inner_deref has been stabilized 2020-08-03 14:20:46 +02:00
Samrat Man Singh
3386f12eca Wrap io::Result from FileDescriptor::{read,write,seek} in InterpResult
The outer InterpResult will be used to indicate that a fn is not
implemented for a struct(eg. `write` for Stdin).

The inner io::Result is just the result from the read/write/seek.
2020-08-03 11:01:42 +05:30
Samrat Man Singh
e3956f4200 Add FileDescriptor trait to abstract fn's on File's and Std{in,out,err} 2020-08-01 20:53:50 +05:30
bors
8a28eaa3fc Auto merge of #1494 - RalfJung:stack-unwind-top, r=RalfJung
test unwinding past topmost frame of a stack

This tests https://github.com/rust-lang/rust/pull/74984
2020-08-01 12:20:45 +00:00
Ralf Jung
5d22145069 test unwinding past topmost frame of a stack 2020-08-01 14:20:05 +02:00
Ralf Jung
35309a200b rustup; fix linked_list test 2020-08-01 14:18:52 +02:00
bors
7b970ef05e Auto merge of #1493 - RalfJung:track-test, r=RalfJung
test track_caller on trait objects

Adds a Miri-side test for https://github.com/rust-lang/rust/issues/74764.
2020-07-31 17:25:34 +00:00
Ralf Jung
729ccbc65e test track_caller on trait objects 2020-07-31 18:30:07 +02:00
bors
55bdb31746 Auto merge of #1492 - RalfJung:rustup, r=RalfJung
Rustup

Adjusting for @oli-obk' log changes.

While at it I also removed the `*_of_val` intrinsics that got moved to rustc (Cc @ecstatic-morse).
2020-07-30 16:32:53 +00:00
Ralf Jung
2dfde5b696 remove upstreamed intrinsic impls 2020-07-30 18:31:40 +02:00
Ralf Jung
d340933112 rustup 2020-07-30 18:31:19 +02:00
bors
720c2bf8f8 Auto merge of #1491 - RalfJung:xargo-check, r=RalfJung
only check-build the dummy xargo project

No reason to actually emit any object code.
This helps with some strange ICEs when testing Miri in the rustc workspace.
2020-07-29 16:24:43 +00:00
Ralf Jung
797436cefb only check-build the dummy xargo project 2020-07-29 18:21:32 +02:00
bors
abe55c2b5b Auto merge of #1490 - RalfJung:rustup, r=RalfJung
rustup for new folder layout

Fixes the fallout from https://github.com/rust-lang/rust/pull/73265.

Blocked on a xargo release with https://github.com/japaric/xargo/pull/301.
2020-07-29 12:27:45 +00:00
Ralf Jung
ee39ac9840 rustup for new folder layout 2020-07-29 14:27:14 +02:00
bors
79cd5a8d4a Auto merge of #1489 - RalfJung:tls-alloc-ids, r=oli-obk
Adjust for new rustc alloc ID handling and deallocate thread-local statics

Miri side of https://github.com/rust-lang/rust/pull/74775.

Fixes https://github.com/rust-lang/miri/issues/1369
Fixes https://github.com/rust-lang/miri/issues/1488
2020-07-27 22:00:15 +00:00
Ralf Jung
cae90b6d29 rustup and test fixes 2020-07-27 23:40:27 +02:00
Ralf Jung
bec7aab7fd Typos
Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
2020-07-27 23:32:15 +02:00
Ralf Jung
6fbaa72642 fix diagnostics printing when triggered during TLS dtor scheduling 2020-07-27 23:32:15 +02:00
Ralf Jung
c77540ce13 deallocate thread-local statics when the thread dies 2020-07-27 23:32:15 +02:00
Ralf Jung
2a42f8e93c fix and test order of TLS dtors and thread joining 2020-07-27 23:32:15 +02:00
Ralf Jung
390899e8b9 test referencing unsupported extern static 2020-07-27 23:32:15 +02:00
Ralf Jung
7b07fc385c get_or_create_thread_local_alloc_id: share code with Memory::get_global_alloc 2020-07-27 23:32:15 +02:00
Ralf Jung
0a4e8caa8c adjust to canonical_alloc_id removal 2020-07-27 23:32:15 +02:00
bors
345b033c3f Auto merge of #1487 - pnadon:miri-rename-undef-uninit, r=RalfJung
Miri rename undef uninit

The changes made here are related to [issue #71193 on Rust](https://github.com/rust-lang/rust/issues/71193), and the pull request [74664 on Rust](https://github.com/rust-lang/rust/pull/74664).

1. renamed `ScalarMaybeUninit::not_undef` to `check_init`
2. renamed `Immediate::to_scalar_or_undef` to `Immediate::to_scalar_or_uninit`
2020-07-27 21:31:51 +00:00
Philippe Nadon
6dd700fd17 Changed not_undef to check_init in foreign_items.rs
Due to changes from upstream, a commit using not_undef was inserted, which had to be updated to use check_init.

related issue #71193
2020-07-27 13:07:25 -06:00