David Cook
06aaea1d6b
Update comment
2020-09-07 15:05:26 -05:00
David Cook
33e928c9ca
Review comments
2020-09-07 10:54:39 -05:00
David Cook
417ac2939a
Implement libc::nanosleep shim
2020-09-06 18:07:17 -05:00
David Cook
6d323e1032
Refactor timespec parsing, improve error handling
2020-09-06 18:07:14 -05:00
bors
c28a8eeb74
Auto merge of #1532 - divergentdave:thread-panic-payload, r=RalfJung
...
Move panic payload state from Machine to Thread
This PR moves the panic payload storage from the `Machine` state to per-thread state. Prior to this change, if one thread panicked while another was still unwinding, Miri would fail with `thread 'rustc' panicked at 'the panic runtime should avoid double-panics', src/shims/panic.rs:51:9`. I ran into this issue while prototyping a round-robin scheduler, but it's also reachable with the current scheduler and contrived programs that use blocking API calls to cause thread switching during unwinding. I wrote a test case along those lines for this change.
2020-09-03 10:09:34 +00:00
David Cook
7a2c6812b9
Per-thread errno storage
2020-09-02 20:57:20 -05:00
Ralf Jung
3466462306
rustup, fix test
2020-09-01 10:55:09 +02:00
David Cook
da2f268443
Review comments
2020-08-31 19:32:14 -05:00
David Cook
3ba7f46058
Move panic payload state from Machine to Thread
2020-08-29 21:38:37 -05:00
Ralf Jung
39e6baeb91
rustup
2020-08-27 09:27:58 +02:00
Ralf Jung
2f9de18f88
rustup; account for ptr_offset_from stabilization
2020-08-24 10:06:44 +02:00
Ralf Jung
df9b2127ce
fix a test for big-endian targets
2020-08-22 18:07:43 +02:00
Ralf Jung
237bea2c17
avoid promotion in alignment test to get different alignment on each try
2020-08-20 10:14:13 +02:00
Ralf Jung
d5b15297ac
forgot to add alignment test loop in one test
2020-08-18 10:19:29 +02:00
Ralf Jung
5b1bc4ba94
make another test more robust against random alignment
2020-08-17 18:22:46 +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
cb985670c1
make alignment check integer-based by default, and add an option to make it symbolic
2020-08-16 17:08:38 +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
Ralf Jung
da2260db44
make sure opening a file fails with isolation enabled
2020-08-10 10:10:08 +02:00
Ralf Jung
5657f08bea
fs: move isolation handling to inside trait
2020-08-08 15:24:30 +02:00
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
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
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
Ralf Jung
729ccbc65e
test track_caller on trait objects
2020-07-31 18:30:07 +02:00
Ralf Jung
ee39ac9840
rustup for new folder layout
2020-07-29 14:27:14 +02:00
Ralf Jung
cae90b6d29
rustup and test fixes
2020-07-27 23:40:27 +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
bc0569253f
enable leak check tests on Windows
2020-07-23 15:56:38 +02:00
Ralf Jung
f68bba9906
test casting a dangling ptr back from an int
2020-07-11 20:56:47 +02:00
Justus K
d23e245f38
Move no_main test to compile-fail
2020-07-09 17:21:09 +02:00
Justus K
c93fc933bd
Add ui test for early exiting if no main
2020-07-09 14:08:45 +02:00
Ralf Jung
6c2521f54f
adjust error messages
2020-07-07 22:48:51 +02:00
Ralf Jung
28b44d970c
test validation of uninit memory (used to ICE)
2020-07-07 22:48:51 +02:00
Ralf Jung
6ca67a346b
rustup
2020-07-02 10:48:01 +02:00
Ralf Jung
fcdacce4b1
fix some ignore-windows comments
2020-06-28 20:40:20 +02:00
Ralf Jung
3a5bcb97ed
move rwlock dequeuing to shared code, and use that code for Windows rwlocks
2020-06-28 11:28:46 +02:00
Ralf Jung
e54619b5e1
with this, we support panics on Windows
2020-06-27 14:43:37 +02:00
Ralf Jung
dca00ab85e
introduce platform-specific module hierarchy for dlsym (similar to foreign_items)
2020-06-27 14:36:05 +02:00
bors
bde2eb4a44
Auto merge of #1460 - RalfJung:modules, r=RalfJung
...
Re-organize platform-specific shims
Move platform-specific code to `shims::{posix::{linux, macos}, windows}`. Also make it private in these modules to ensure we are reasonably structured.
2020-06-27 11:27:36 +00:00
Ralf Jung
395f5d40dc
Rename shims::{sync -> posic_sync} and move sync_singlethread test to other sync test
2020-06-27 12:37:12 +02:00
Ralf Jung
b46f946c81
supply our own implementation of the CTFE pointer comparison intrinsics
2020-06-27 11:57:43 +02:00
Ralf Jung
3ea8c5fa33
bump Rust
2020-06-26 20:36:08 +02:00
Ralf Jung
2e5a0dc172
add a miscompilation test
2020-06-22 11:32:01 +02:00
Ralf Jung
8d1d572472
unaligned-raw-deref is always UB
2020-06-20 14:34:57 +02:00