Skip to content

Miri subtree update #116508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
cfbcc0e
add test for a function ABI mismatch due to target features
RalfJung Oct 2, 2023
43d1042
Auto merge of #3099 - RalfJung:abi-target-feature, r=RalfJung
bors Oct 2, 2023
91ef03b
Fix typos `*ucom` → `ucom*`
eduardosm Oct 3, 2023
3e21c1f
wording tweaks
RalfJung Oct 3, 2023
4f73d3f
Auto merge of #3102 - eduardosm:typos, r=RalfJung
bors Oct 3, 2023
31a5755
auto-detect no_std where possible
RalfJung Oct 4, 2023
7d065db
miri-script: print which sysroot target we are building
RalfJung Oct 4, 2023
40c928e
Auto merge of #3105 - RalfJung:sysroot-target, r=RalfJung
bors Oct 4, 2023
6ed502d
Auto merge of #3000 - RalfJung:no_std, r=oli-obk
bors Oct 5, 2023
5178ae6
Tree Borrows: do not create new tags as 'Active'
RalfJung Oct 5, 2023
ff3e990
Auto merge of #3106 - RalfJung:tree-borrows-initial, r=RalfJung
bors Oct 5, 2023
95c4590
Update miri dependencies
eduardosm Oct 5, 2023
f49d325
Update cargo-miri dependencies
eduardosm Oct 5, 2023
bbebfa7
Update miri-script dependencies
eduardosm Oct 5, 2023
11afb99
Update test dependencies
eduardosm Oct 5, 2023
1a6ab01
Auto merge of #3107 - eduardosm:update-deps, r=RalfJung
bors Oct 5, 2023
dff7d5a
Move getentropy handling to a shared location for foreign item implem…
BlackHoleFox Oct 1, 2023
f9003c0
Auto merge of #3098 - BlackHoleFox:apple-entropy, r=RalfJung
bors Oct 6, 2023
bc8d4df
refactor dlsym: dispatch symbols via the normal shim mechanism
RalfJung Oct 6, 2023
099311b
make some things on foreign_items private
RalfJung Oct 6, 2023
16cde06
allow dyn_sym in the files where they are defined; remove unreachable…
RalfJung Oct 6, 2023
4135408
Auto merge of #3108 - RalfJung:dlsym, r=RalfJung
bors Oct 6, 2023
03a03e2
add a direct dlsym test
RalfJung Oct 6, 2023
4587c7c
Auto merge of #3109 - RalfJung:dlsym, r=RalfJung
bors Oct 6, 2023
bf1356e
Fix problems of Reserved -> Frozen
Vanille-N Sep 20, 2023
e1e880e
Do not use host floats in `simd_{ceil,floor,round,trunc}`
eduardosm Oct 6, 2023
3c511bb
Auto merge of #3067 - Vanille-N:spurious-incremental, r=RalfJung
bors Oct 6, 2023
375ff3e
Auto merge of #3110 - eduardosm:rounding-without-host-floats, r=RalfJung
bors Oct 6, 2023
ea56007
Preparing for merge from rustc
RalfJung Oct 6, 2023
100ea2b
Merge from rustc
RalfJung Oct 6, 2023
3b08930
Auto merge of #3112 - RalfJung:rustup, r=RalfJung
bors Oct 6, 2023
d322243
Preparing for merge from rustc
Oct 7, 2023
722736a
Merge from rustc
Oct 7, 2023
1c42857
Auto merge of #3113 - rust-lang:rustup-2023-10-07, r=saethlin
bors Oct 7, 2023
5aecfe4
update lockfile
RalfJung Oct 7, 2023
a04b7a3
allow option-ext as a tool dependency (MPL licensed)
RalfJung Oct 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/miri/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
self.check_abi(abi, exp_abi)?;
if let Some((body, instance)) = self.eval_context_mut().lookup_exported_symbol(link_name)? {
// If compiler-builtins is providing the symbol, then don't treat it as a clash.
// We'll use our built-in implementation in `emulate_foreign_item_by_name` for increased
// We'll use our built-in implementation in `emulate_foreign_item_inner` for increased
// performance. Note that this means we won't catch any undefined behavior in
// compiler-builtins when running other crates, but Miri can still be run on
// compiler-builtins itself (or any crate that uses it as a normal dependency)
Expand Down
4 changes: 2 additions & 2 deletions src/tools/miri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#![feature(yeet_expr)]
#![feature(nonzero_ops)]
#![feature(round_ties_even)]
#![feature(let_chains)]
#![feature(lint_reasons)]
#![feature(trait_upcasting)]
// Configure clippy and other lints
Expand Down Expand Up @@ -86,9 +87,8 @@ pub use rustc_const_eval::interpret::*;
// Resolve ambiguity.
pub use rustc_const_eval::interpret::{self, AllocMap, PlaceTy, Provenance as _};

pub use crate::shims::dlsym::{Dlsym, EvalContextExt as _};
pub use crate::shims::env::{EnvVars, EvalContextExt as _};
pub use crate::shims::foreign_items::EvalContextExt as _;
pub use crate::shims::foreign_items::{DynSym, EvalContextExt as _};
pub use crate::shims::intrinsics::EvalContextExt as _;
pub use crate::shims::os_str::EvalContextExt as _;
pub use crate::shims::panic::{CatchUnwindData, EvalContextExt as _};
Expand Down
15 changes: 7 additions & 8 deletions src/tools/miri/src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -707,11 +707,10 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
);
}
"android" => {
// "signal"
// "signal" -- just needs a non-zero pointer value (function does not even get called),
// but we arrange for this to be callable anyway (it will then do nothing).
let layout = this.machine.layouts.const_raw_ptr;
let dlsym = Dlsym::from_str("signal".as_bytes(), &this.tcx.sess.target.os)?
.expect("`signal` must be an actual dlsym on android");
let ptr = this.fn_ptr(FnVal::Other(dlsym));
let ptr = this.fn_ptr(FnVal::Other(DynSym::from_str("signal")));
let val = ImmTy::from_scalar(Scalar::from_pointer(ptr, this), layout);
Self::alloc_extern_static(this, "signal", val)?;
// A couple zero-initialized pointer-sized extern statics.
Expand Down Expand Up @@ -867,7 +866,7 @@ impl<'mir, 'tcx> MiriInterpCxExt<'mir, 'tcx> for MiriInterpCx<'mir, 'tcx> {
/// Machine hook implementations.
impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
type MemoryKind = MiriMemoryKind;
type ExtraFnVal = Dlsym;
type ExtraFnVal = DynSym;

type FrameExtra = FrameExtra<'tcx>;
type AllocExtra = AllocExtra<'tcx>;
Expand Down Expand Up @@ -939,15 +938,15 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
#[inline(always)]
fn call_extra_fn(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
fn_val: Dlsym,
fn_val: DynSym,
abi: Abi,
args: &[FnArg<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<mir::BasicBlock>,
_unwind: mir::UnwindAction,
unwind: mir::UnwindAction,
) -> InterpResult<'tcx> {
let args = ecx.copy_fn_args(args)?; // FIXME: Should `InPlace` arguments be reset to uninit?
ecx.call_dlsym(fn_val, abi, &args, dest, ret)
ecx.emulate_dyn_sym(fn_val, abi, &args, dest, ret, unwind)
}

#[inline(always)]
Expand Down
48 changes: 0 additions & 48 deletions src/tools/miri/src/shims/dlsym.rs

This file was deleted.

Loading