bors
2d6d73fafe
Auto merge of #1517 - RalfJung:align-test, r=RalfJung
...
forgot to add alignment test loop in one test
As expected, checking the physical integer address made alignment tests fragile, and I forgot to add the retry loop for this one.
2020-08-18 08:21:15 +00:00
Ralf Jung
d5b15297ac
forgot to add alignment test loop in one test
2020-08-18 10:19:29 +02:00
bors
066fa629f2
Auto merge of #1513 - RalfJung:int-align, r=RalfJung
...
add option to use force_int for alignment check
Fixes https://github.com/rust-lang/miri/issues/1074 . Depends on https://github.com/rust-lang/rust/pull/75592 .
2020-08-17 16:23:07 +00:00
Ralf Jung
5b1bc4ba94
make another test more robust against random alignment
2020-08-17 18:22:46 +02:00
Ralf Jung
db159b8709
rustup
2020-08-17 16:51:48 +02:00
Ralf Jung
f691e573b2
tweak alignment check docs
2020-08-17 11:51:18 +02:00
Ralf Jung
0913653e06
make sure we test panic of interpreter-impelemted align_offset
2020-08-16 18:31:48 +02:00
Ralf Jung
d4e5943259
use real align_offset unless we symbolic alignment check is enabled
2020-08-16 18:26:04 +02:00
Ralf Jung
664706662f
adjust diagnostics to alignment check mode
2020-08-16 17:16:53 +02:00
Ralf Jung
5a579f281d
document -Zmiri-symbolic-alignment-check
2020-08-16 17:12:32 +02:00
Ralf Jung
cb985670c1
make alignment check integer-based by default, and add an option to make it symbolic
2020-08-16 17:08:38 +02:00
bors
ca9e988bdb
Auto merge of #1510 - RalfJung:stderr, r=RalfJung
...
fix Stderr::as_file_handle error message
2020-08-13 12:27:24 +00:00
Ralf Jung
df311293e2
fix Stderr::as_file_handle error message
2020-08-13 14:27:03 +02:00
bors
99a57a3f9e
Auto merge of #1509 - samrat:fd-trait-fixes, r=RalfJung
...
Remove lifetime from FileDescriptor trait
Also:
- Type annotate `handles` declaration, instead of annotating every insert.
- Add note about flush being unnecessary when writing to stderr
Addresses comments in #1495 and #1497
2020-08-13 11:57:46 +00:00
Samrat Man Singh
0c25064117
Remove unnecessary whitespace
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-08-13 16:18:08 +05:30
Samrat Man Singh
46852d736e
Remove lifetime from FileDescriptor trait
...
Also:
- Remove type annotate `handles` declaration instead of every insert.
- Add note about flush being unnecessary when writing to stderr
2020-08-13 15:01:52 +05:30
bors
1bfb26d6ca
Auto merge of #1504 - RalfJung:ill-formed-const, r=RalfJung
...
add test for unused ill-formed constant
Once https://github.com/rust-lang/rust/pull/75339 lands, this test should pass.
Fixes https://github.com/rust-lang/miri/issues/1382 .
2020-08-13 06:44:00 +00:00
Ralf Jung
925d60760e
rustup
2020-08-13 08:43:28 +02:00
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