Auto merge of #1630 - RalfJung:rustup, r=RalfJung

Rustup

Includes https://github.com/rust-lang/miri/pull/1626 and https://github.com/rust-lang/miri/pull/1629.
This commit is contained in:
bors 2020-11-19 08:39:37 +00:00
commit c8f51fc5a7
5 changed files with 21 additions and 17 deletions

View File

@ -1 +1 @@
12f0dba618e761c987142474435dff95ab177f3c bf469eb6c20ccea05400a1942c70343f36705e1c

View File

@ -12,6 +12,8 @@ impl Dlsym {
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> { pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
Ok(match &*name { Ok(match &*name {
"__pthread_get_minstack" => None, "__pthread_get_minstack" => None,
"getrandom" => None, // std falls back to syscall(SYS_getrandom, ...) when this is NULL.
"statx" => None, // std falls back to syscall(SYS_statx, ...) when this is NULL.
_ => throw_unsup_format!("unsupported Linux dlsym: {}", name), _ => throw_unsup_format!("unsupported Linux dlsym: {}", name),
}) })
} }

View File

@ -208,7 +208,9 @@ fn getrandom<'tcx>(
// The only supported flags are GRND_RANDOM and GRND_NONBLOCK, // The only supported flags are GRND_RANDOM and GRND_NONBLOCK,
// neither of which have any effect on our current PRNG. // neither of which have any effect on our current PRNG.
this.read_scalar(flags)?.to_i32()?; let _flags = this.read_scalar(flags)?;
// FIXME: Check that this is an integer type of the right size.
// Currently, some callers pass i32 and some usize, is that even allowed?
this.gen_random(ptr, len)?; this.gen_random(ptr, len)?;
this.write_scalar(Scalar::from_machine_usize(len, this), dest)?; this.write_scalar(Scalar::from_machine_usize(len, this), dest)?;

View File

@ -1,5 +1,5 @@
// normalize-stderr-test "at .*/(rust[^/]*|checkout)/library/" -> "at RUSTLIB/" // normalize-stderr-test "at .*/(rust[^/]*|checkout)/library/" -> "at RUSTLIB/"
// normalize-stderr-test "RUSTLIB/(.*):\d+"-> "RUSTLIB/$1:LL" // normalize-stderr-test "RUSTLIB/([^:]*):\d+:\d+"-> "RUSTLIB/$1:LL:CC"
// normalize-stderr-test "::<.*>" -> "" // normalize-stderr-test "::<.*>" -> ""
// compile-flags: -Zmiri-disable-isolation // compile-flags: -Zmiri-disable-isolation

View File

@ -1,28 +1,28 @@
0: func_d 0: func_d
at $DIR/backtrace-std.rs:18 at $DIR/backtrace-std.rs:18:45
1: func_c 1: func_c
at $DIR/backtrace-std.rs:17 at $DIR/backtrace-std.rs:17:45
2: func_b 2: func_b
at $DIR/backtrace-std.rs:11 at $DIR/backtrace-std.rs:11:48
3: func_a 3: func_a
at $DIR/backtrace-std.rs:10 at $DIR/backtrace-std.rs:10:45
4: main 4: main
at $DIR/backtrace-std.rs:21 at $DIR/backtrace-std.rs:21:19
5: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn()) 5: <fn() as std::ops::FnOnce<()>>::call_once - shim(fn())
at RUSTLIB/core/src/ops/function.rs:LL at RUSTLIB/core/src/ops/function.rs:LL:CC
6: std::sys_common::backtrace::__rust_begin_short_backtrace 6: std::sys_common::backtrace::__rust_begin_short_backtrace
at RUSTLIB/std/src/sys_common/backtrace.rs:LL at RUSTLIB/std/src/sys_common/backtrace.rs:LL:CC
7: std::rt::lang_start::{closure#0} 7: std::rt::lang_start::{closure#0}
at RUSTLIB/std/src/rt.rs:LL at RUSTLIB/std/src/rt.rs:LL:CC
8: std::ops::function::impls::call_once 8: std::ops::function::impls::call_once
at RUSTLIB/core/src/ops/function.rs:LL at RUSTLIB/core/src/ops/function.rs:LL:CC
9: std::panicking::r#try::do_call 9: std::panicking::r#try::do_call
at RUSTLIB/std/src/panicking.rs:LL at RUSTLIB/std/src/panicking.rs:LL:CC
10: std::panicking::r#try 10: std::panicking::r#try
at RUSTLIB/std/src/panicking.rs:LL at RUSTLIB/std/src/panicking.rs:LL:CC
11: std::panic::catch_unwind 11: std::panic::catch_unwind
at RUSTLIB/std/src/panic.rs:LL at RUSTLIB/std/src/panic.rs:LL:CC
12: std::rt::lang_start_internal 12: std::rt::lang_start_internal
at RUSTLIB/std/src/rt.rs:LL at RUSTLIB/std/src/rt.rs:LL:CC
13: std::rt::lang_start 13: std::rt::lang_start
at RUSTLIB/std/src/rt.rs:LL at RUSTLIB/std/src/rt.rs:LL:CC