Commit Graph

5547 Commits

Author SHA1 Message Date
bors
67c04afc25 Auto merge of #1788 - hyd-dev:rustup, r=RalfJung
`encountered a NULL reference` -> `encountered a null reference`

It's changed from "NULL" to "null" (probably by rust-lang/rust#84842) in `rustc`, and causing some test failures:
https://github.com/rust-lang/miri/runs/2498333632#step:8:640
2021-05-04 08:27:00 +00:00
bors
cf9d77de47 Auto merge of #1787 - DianaNites:patch-1, r=RalfJung
Fix broken self-link
2021-05-04 08:08:31 +00:00
hyd-dev
47c5b6eb08
encountered a NULL reference -> encountered a null reference 2021-05-04 15:53:19 +08:00
Diana
67ec0a5ce3 Fix dead self-link 2021-05-03 22:52:09 -04:00
bors
bdce1ddf88 Auto merge of #1785 - Smittyvb:fast-math-ub, r=RalfJung
Throw UB if f*_fast intrinsic called with non-finite value

Calling these intrinsics with non-finite values is undefined behaviour, since they result in `f*` intrinsics in LLVM with the `fast` flag, and `fast` math on non-finite values results in `poison` values. (technically LLVM only considers it UB upon _using_ the value, but that shouldn't make much of a difference)
2021-05-03 17:32:50 +00:00
Smitty
e0e59f6020 Simplify finiteness checking 2021-05-03 10:08:42 -04:00
Smitty
68d29554a8 test for infinite value in f*_fast 2021-05-03 09:56:51 -04:00
bors
43ae3148e7 Auto merge of #1786 - RalfJung:rustup, r=RalfJung
fix checking os_family

Cc https://github.com/rust-lang/rust/issues/84848
2021-05-03 09:25:41 +00:00
Ralf Jung
c3ae8a6f90 adjust for different 'yield' hint on aarch64 2021-05-03 11:25:05 +02:00
Ralf Jung
aac6e2ad3e fix checking os_family 2021-05-03 09:57:13 +02:00
Smitty
e591b83185 UB if f*_fast intrinsic called with nonfinite value 2021-05-02 12:25:00 -04:00
bors
0e3038571c Auto merge of #1784 - hyd-dev:harness-false, r=RalfJung
Use `harness = false` instead of `#![feature(custom_test_frameworks)]`

Quoting from the comment in `tests/compiletest.rs`:
> Custom test runner, to avoid libtest being wrapped around compiletest which wraps libtest.

I believe `harness = false` is more suitable for that purpose.

I have verified that both `./miri test` and `LD_LIBRARY_PATH=$PWD/build/x86_64-unknown-linux-gnu/stage2/lib PATH=$PWD/build/bin:$PATH ./x.py test src/tools/miri` work well.
2021-05-01 16:07:48 +00:00
hyd-dev
2da6bedaec
Use harness = false instead of #![feature(custom_test_frameworks)] 2021-05-01 22:28:33 +08:00
bors
41f3fe6431 Auto merge of #1783 - hyd-dev:rustup, r=RalfJung
Rustup for rust-lang/rust#84401

cc rust-lang/rust#84741
2021-04-30 14:08:13 +00:00
hyd-dev
b30c5fef5b
Rustup for rust-lang/rust#84401 2021-04-30 19:35:59 +08:00
bors
5faf5a5ca0 Auto merge of #1781 - RalfJung:rustup, r=RalfJung
rustup
2021-04-25 14:58:18 +00:00
Ralf Jung
4c741e5fb2 rustup 2021-04-25 16:57:48 +02:00
bors
58436e942a Auto merge of #1769 - RalfJung:remove-compat, r=oli-obk
remove compatibility code for passing miri flags via cargo arguments

With https://github.com/rust-lang/miri/pull/1540, we deprecated `cargo miri test -- -Zmiri-disable-stacked-borrows` as a style of passing flags to Miri, introducing `MIRIFLAGS="-Zmiri-disable-stacked-borrows" cargo miri test` instead. This made `cargo miri` more compatible with `cargo`; both now behave the same in terms of argument parsing.

However, to avoid breaking things, I introduced some backwards compatibility hack such that the old way would still work. Six months later, I think it is time to remove that hack.
2021-04-22 07:47:56 +00:00
bors
36176cde68 Auto merge of #1778 - RalfJung:thread-local-const-init, r=RalfJung
test thread_local_const_init

Blocked on https://github.com/rust-lang/rust/pull/84291
2021-04-20 08:01:46 +00:00
Ralf Jung
2ae699c56d make TLS-drop-test more cross-platform 2021-04-20 09:59:26 +02:00
bors
74ffda2dd7 Auto merge of #1779 - RalfJung:cargo-miri-xargo, r=RalfJung
fix MIRI_BE_RUSTC value during sysroot build

`@hyd-dev` pointed out that `MIRI_BE_RUSTC` is set to an incorrect value during the xargo sysroot build. This fixes that.
2021-04-20 07:41:41 +00:00
Ralf Jung
f73cc11f3f rustup 2021-04-20 09:40:18 +02:00
Ralf Jung
6834944fd3 fix MIRI_BE_RUSTC value during sysroot build 2021-04-18 12:29:31 +02:00
Ralf Jung
d512ba2ae2 test thread_local_const_init 2021-04-18 11:01:08 +02:00
bors
a86eab3e6c Auto merge of #1777 - crlf0710:fix_compilation, r=RalfJung
Remove `main_fn.rs` test.

Fixes build error caused by https://github.com/rust-lang/rust/issues/84240 .
2021-04-16 16:46:05 +00:00
Charles Lew
85f7dd6131 Remove main_fn.rs test. 2021-04-17 00:04:09 +08:00
bors
b13b79db73 Auto merge of #1775 - ABouttefeux:master, r=RalfJung
Fix failing test after merge of PR rust#83948

Cc https://github.com/rust-lang/rust/issues/84202
2021-04-15 08:19:18 +00:00
Aliénore Bouttefeux
64d07ea217 change rust version to head 2021-04-15 10:17:54 +02:00
Aliénore Bouttefeux
648638976a allow deref of null ptr in test 2021-04-15 10:00:39 +02:00
bors
f76e256086 Auto merge of #1774 - RalfJung:contrib, r=RalfJung
fix CONTRIBUTING example

Fixes https://github.com/rust-lang/miri/issues/1773
2021-04-12 17:01:45 +00:00
Ralf Jung
67b8844628 fix CONTRIBUTING example 2021-04-12 19:01:10 +02:00
bors
e6ffc689aa Auto merge of #1772 - RalfJung:less-timeout-checking, r=RalfJung
only check timeouts when a thread yields

Currently, we check for expired timeouts after each step of execution. That seems excessive. This changes the scheduler to only check for timeouts when the active thread cannot continue running any more.

`@vakaras` does this sound right? `pthread_cond_timedwait` anyway already yields, of course, since it blocks on getting the signal (or the timeout).
2021-04-11 14:59:27 +00:00
Ralf Jung
0674d439b6 test calling pthread_cond_timedwait with an already elapsed timeout 2021-04-11 14:21:42 +02:00
bors
afabaf30d7 Auto merge of #1771 - vakaras:bug-1763, r=RalfJung
Attempt to fix #1763

As discussed on issue #1763, just try asking the scheduler to try again.

Fixes https://github.com/rust-lang/miri/issues/1763
2021-04-11 11:49:27 +00:00
Vytautas Astrauskas
50f68dce21 Reference issue 1763 in the comment. 2021-04-11 13:39:03 +02:00
Ralf Jung
bda328e26a only check timeouts when a thread yields 2021-04-11 13:32:47 +02:00
Vytautas Astrauskas
72ca2a7a85 Attempt to fix #1763 by asking the scheduler to retry choosing an operation. 2021-04-10 20:23:32 +02:00
bors
1ae7bfc6c6 Auto merge of #1770 - RalfJung:no_run, r=RalfJung
make sure that we truly do not run no_run doctests
2021-04-10 13:11:05 +00:00
Ralf Jung
2decc78db9 make sure that we truly do not run no_run doctests 2021-04-10 14:20:06 +02:00
Ralf Jung
eaba4b2d2a remove compatibility code for passing miri flags via cargo arguments 2021-04-10 14:07:46 +02:00
bors
ccbef9c69f Auto merge of #1768 - RalfJung:readme, r=RalfJung
add the bad doctests we found to the trophy case
2021-04-10 10:35:21 +00:00
Ralf Jung
87882f2c6a add the bad doctests we found to the trophy case 2021-04-10 12:33:18 +02:00
bors
7c66eaf9f1 Auto merge of #1766 - RalfJung:dropped-temporary, r=RalfJung
add test to detect dropped temporary

Let's make sure we catch this kind of error.
2021-04-10 10:10:27 +00:00
Ralf Jung
21968aa53b add test to detect dropped temporary 2021-04-10 12:09:10 +02:00
bors
d0a4b5d5cc Auto merge of #1765 - rust-lang:rustup, r=RalfJung
rustup

Looks like we haven't had one of these in a bit.
2021-04-10 09:03:11 +00:00
Ralf Jung
aa3bc06f0f rustup 2021-04-10 11:00:41 +02:00
bors
b9b2af9729 Auto merge of #1764 - RalfJung:readme, r=RalfJung
fix typo in README

"you program" → "your program"
2021-04-09 09:29:48 +00:00
Ralf Jung
0a7a41f6ad fix typo in README 2021-04-09 11:24:33 +02:00
bors
1ec52abb48 Auto merge of #1761 - hyd-dev:build-rs-proc-macro-no-default-args, r=RalfJung
Don't use `MIRI_DEFAULT_ARGS` to compile host crates

They (specifically, `--cfg=miri`) may cause procedural macros (and probably build scripts) to depend on Miri-only symbols, such as `miri_resolve_frame`.

This PR makes `miri` detect host crates inspecting the value of the `MIRI_BE_RUSTC` environment variable (`target` -> target crate, `host` -> host crate, other -> panic) and skip the insertion of `MIRI_DEFAULT_ARGS` if it's a host crate.

Fixes #1760
2021-04-08 17:07:15 +00:00
hyd-dev
3dff1d4fcd
Don't use MIRI_DEFAULT_ARGS to compile host crates 2021-04-09 00:57:59 +08:00