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
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
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
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
Justus K
d23e245f38
Move no_main test to compile-fail
2020-07-09 17:21:09 +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
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
3ea8c5fa33
bump Rust
2020-06-26 20:36:08 +02:00
Ralf Jung
8d1d572472
unaligned-raw-deref is always UB
2020-06-20 14:34:57 +02:00
Ralf Jung
a29f86b512
make sure '&raw *' on a dangling raw ptr is UB
2020-06-20 14:28:55 +02:00
Ralf Jung
2940da9d1f
bump Rust
2020-06-20 11:48:42 +02:00
Ralf Jung
3032224d19
rustup, adjust error message
2020-05-31 10:30:25 +02:00
Ralf Jung
c77e9022d5
rustup (and account for stabilization)
2020-05-30 09:23:25 +02:00
Vytautas Astrauskas
90590a399d
Small fixes.
2020-05-25 00:02:54 +02:00
Vytautas Astrauskas
6ff0af3adf
Fix #1419 .
2020-05-25 00:02:54 +02:00
Vytautas Astrauskas
bd97074517
Small changes.
2020-05-25 00:02:54 +02:00
Vytautas Astrauskas
fdfd56b75b
Small changes.
2020-05-25 00:02:54 +02:00
David Cook
87a846f2d6
Update to match rustc changes
2020-05-22 17:03:25 +02:00
Oliver Scherer
3fdab9c446
Update to rustc changes
2020-05-10 10:14:03 +02:00
Ralf Jung
b4ad90669b
rustup
2020-05-07 23:59:26 +02:00
Ralf Jung
fb3a067ac6
rustup; fix error messages
2020-05-07 08:38:59 +02:00
Chase Albert
f741f2cc71
Correct the test.
2020-05-04 23:22:00 -04:00
Chase Albert
f46d197431
Test for too many args.
2020-05-04 13:51:23 -04:00
Chase Albert
46aaab30fe
Add a test for check_arg_count.
2020-05-04 13:51:23 -04:00
Ralf Jung
dbd6403955
rustup for fixed error messages
2020-05-02 02:13:48 +02:00
Ralf Jung
393165f859
rustup; fix for changed error messages
2020-05-01 14:43:59 +02:00
Ralf Jung
1a704a517a
rustup, adjust error messages
2020-05-01 10:29:39 +02:00
Vytautas Astrauskas
60cd8aa4b0
Delete a duplicate test.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
ff5e35b90a
Added a test that joining main is UB.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
90e9a87fa7
Add an explanatory comment to the test.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
eaa63266d8
Make multiple threads to try to join a thread while it is still running.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
40e50bf58b
Clarify test comments.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
e7b82fde4a
Fix the test annotation.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
e7c2694b8b
Make the main thread detached.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
9a01c3fa3e
Clarify comments about TLS destructor handling in Windows, add a test for TLS destructors.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
5b55e0706c
Add more concurrency tests.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
80459bbf77
Improve concurrency tests.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
421be273cc
Add concurrency tests.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
325c31e578
Address some of the reviewers comments.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
82f17ab917
Implement basic support for concurrency (Linux only).
2020-04-27 14:23:32 -07:00
bors
e06df3a881
Auto merge of #1373 - RalfJung:test-rename, r=RalfJung
...
rename tests: undefined -> uninit
2020-04-27 10:54:57 +00:00
bors
4556daadc2
Auto merge of #1370 - samrat:add-scalar-size-test, r=RalfJung
...
Add test to verify that argument size mismatch throws UB
Also, bump up `rust-version`
Closes #1355
2020-04-27 10:33:29 +00:00
Ralf Jung
a5ddaa07eb
rename tests: undefined -> uninit
2020-04-27 12:32:03 +02:00
Samrat Man Singh
73f258c451
Replace error-pattern with annotation; remove unreachable line
2020-04-27 15:34:42 +05:30
bors
da940eb91f
Auto merge of #1354 - divergentdave:dump-alloc-on-undef-read, r=RalfJung
...
Print hex dump of alloc on reading undef bytes
Here's a small addition I made locally to the UB diagnostics, in case you're interested in it. This PR calls `dump_alloc()` on the relevant allocation if Miri fails on UB due to reading undefined bytes. This came in handy when diagnosing such an issue in a large program using unsafe Rust, in part because it wasn't deterministic enough to use `-Zmiri-track-alloc-id=`. If you'd like to put this behind another -Z flag, let me know.
2020-04-27 09:33:30 +00:00
Samrat Man Singh
ae9796b9d8
Fix shim_arg_size test for 32-bit machines
2020-04-27 10:00:35 +05:30
Samrat Man Singh
da86c81e39
Add test to verify arg size mismatch throws UB
...
Also: bump up `rust-version`
2020-04-27 09:37:31 +05:30
Ralf Jung
c46668c556
fix exit code on rustc errors
2020-04-25 11:12:50 +02:00
David Cook
7f92eab3c4
Add test to exercise InvalidUndefBytes
2020-04-23 20:00:25 -05:00
Ralf Jung
73772fede6
adjust for Weak::as_raw -> as_ptr rename
2020-04-20 10:04:17 +02:00
Ralf Jung
70c828b761
test some more extreme cast cases
2020-04-19 09:34:54 +02:00
bors
45113eb6a4
Auto merge of #1325 - RalfJung:float_to_int_unchecked, r=RalfJung
...
implement float_to_int_unchecked
@hanna-kruppe would be great if you could have a look at this.
`float.rs` tests legal casts. `test_cast` checks that both `as` casts and unchecked casts work (i.e., these are not saturating). The `compile-fail` tests should ensure that illegal casts via the intrinsic are detected as such.
Fixes https://github.com/rust-lang/miri/issues/1264
2020-04-18 08:13:24 +00:00
Ralf Jung
bb38ab4340
use u128::MAX symbolic name
2020-04-18 10:11:45 +02:00
Ralf Jung
0345ee42da
some UB gets masked by optimizations
2020-04-18 09:15:59 +02:00
Ralf Jung
c6ab27577b
test that we check dynamic actual size of object
2020-04-18 02:06:36 +02:00
Ralf Jung
521e77d712
test that we properly check dynamic alignment
2020-04-17 20:43:54 +02:00
Ralf Jung
e6822d60b3
make sure we find some things without validation or stacked borrows, respectively
2020-04-14 10:23:47 +02:00
Ralf Jung
179e78d0ad
make sure our disable flags do not miss all bugs; move type-assert intrinsic tests to their folder
2020-04-14 10:23:47 +02:00
Ralf Jung
f4a15444cf
fix comment in alignment test
2020-04-14 09:50:20 +02:00
Ralf Jung
fd8beaf5c4
add option to disable alignment checks
2020-04-13 17:58:03 +02:00
Ralf Jung
17c52d47e7
add tests for invalid float-to-int casts
2020-04-12 12:01:20 +02:00
Ralf Jung
30d07c8616
move error-pattern to inline annotation where possible
2020-04-12 12:01:20 +02:00
Ralf Jung
b2bf4ec2f5
organize compile-fail tests in folders
2020-04-11 11:36:55 +02:00
Ralf Jung
d276d952ff
fix unused warnings in tests
2020-04-10 10:27:59 +02:00
bors
325682ad56
Auto merge of #1301 - RalfJung:global-leaks, r=RalfJung
...
memory reachable through globals is not a leak
Blocked on https://github.com/rust-lang/rust/pull/70762
Fixes https://github.com/rust-lang/miri/issues/940
2020-04-07 17:33:24 +00:00
Ralf Jung
7841f44593
rustup
2020-04-07 19:33:03 +02:00
David Cook
134d6a2faa
Add tests, improve test coverage
2020-04-05 14:55:57 -05:00
David Cook
d5d5a56926
Add tests
2020-04-05 13:25:49 -05:00
Ralf Jung
cd132f563e
port compile-fail allocator tests to stable API
2020-04-02 13:33:59 +02:00
Ralf Jung
5130aa55a2
adjust stacktrace printing to rustc changes
2020-04-02 09:14:17 +02:00
bors
f4308a0728
Auto merge of #1267 - RalfJung:macos-dtors, r=RalfJung
...
implement TLS cleanup for macOS
Now that I can run macOS interpretation locally, this was not that hard to fix. ;)
Fixes https://github.com/rust-lang/miri/issues/443
2020-03-28 07:55:42 +00:00
Ralf Jung
c5ef8a656f
enable leak tests on macOS
2020-03-27 19:39:35 +01:00
JOE1994
ea836eeb0d
remove or update 'ignore-windows' annotations in some tests
2020-03-27 14:18:19 -04:00
Ralf Jung
47b91e619a
test unreachable intrinsic
2020-03-25 09:32:15 +01:00
Ralf Jung
d85f09c4e4
platform -> target
2020-03-22 08:55:39 +01:00
Ralf Jung
238ed49a07
detect UB: overflow in copy/write_bytes
2020-03-21 17:54:33 +01:00
Ralf Jung
8acfafe186
test for zero-sized write_bytes to NULL
2020-03-21 17:54:18 +01:00
Ralf Jung
e890d4d5e1
call error location was fixed by rustup
2020-03-21 12:52:23 +01:00
Ralf Jung
5c09047411
fix tests
2020-03-21 10:54:56 +01:00
Ralf Jung
bde3111c61
test windows panic message
2020-03-21 10:17:57 +01:00
Ralf Jung
49051e05ea
rustup, and some final message adjustments
2020-03-19 08:41:01 +01:00
Ralf Jung
e1e158e103
adjust error messages for lower-case start
2020-03-19 08:26:08 +01:00
Ralf Jung
77cc0cddd9
add test for validation finding use-after-free
2020-03-19 08:25:08 +01:00
Ralf Jung
1103a10e2c
adjust for error reform
2020-03-19 08:25:08 +01:00
Elichai Turkel
0826899ca0
Remove uninhabit/zeroed tests to a new test file for abort checking
2020-03-18 14:14:23 +02:00
Ralf Jung
8a26a288c2
rustup
2020-03-16 21:32:57 +01:00
Ralf Jung
497fbcbf44
rustup, fix for intrinsic rename and transmute error change
2020-03-14 09:27:35 +01:00
Ralf Jung
5531a79f4c
rustup, test Abort terminator
2020-03-12 20:48:04 +01:00
Ralf Jung
5ef48593fb
adjust error
2020-03-09 17:03:39 +01:00
Christian Poveda
8392a0c589
only expose environ on linux
2020-03-08 10:16:31 -05:00
Christian Poveda
18a71ef7b3
minor corrections
2020-03-07 11:35:00 -05:00