Skip to main content

Module eval

Module eval 

Source
Expand description

Main evaluator loop and setting up the initial stack frame.

Re-exportsΒ§

use std::ffi::OsStr; πŸ”’
use std::ffi::OsString; πŸ”’
use std::num::NonZeroI32; πŸ”’
use std::panic; πŸ”’
use std::panic::AssertUnwindSafe; πŸ”’
use std::path::PathBuf; πŸ”’
use std::rc::Rc; πŸ”’
use std::task::Poll; πŸ”’
use std::iter; πŸ”’
use std::mem; πŸ”’
use std::thread; πŸ”’
use rustc_abi::ExternAbi; πŸ”’
use rustc_data_structures::fx::FxHashMap; πŸ”’
use rustc_data_structures::fx::FxHashSet; πŸ”’
use rustc_errors::FatalErrorMarker; πŸ”’
use rustc_hir::def::Namespace; πŸ”’
use rustc_hir::def_id::DefId; πŸ”’
use rustc_hir::def_id::LOCAL_CRATE; πŸ”’
use rustc_hir_analysis::check::check_function_signature; πŸ”’
use rustc_middle::middle::exported_symbols::ExportedSymbol; πŸ”’
use rustc_middle::traits::ObligationCause; πŸ”’
use rustc_middle::traits::ObligationCauseCode; πŸ”’
use rustc_middle::ty::layout::HasTyCtxt; πŸ”’
use rustc_middle::ty::layout::HasTypingEnv; πŸ”’
use rustc_middle::ty::layout::LayoutCx; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_middle::ty::Ty; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_session::config::EntryFnType; πŸ”’
use rustc_target::spec::Os; πŸ”’
use crate::concurrency::GenmcCtx; πŸ”’
use crate::diagnostics::report_leaks; πŸ”’
use crate::helpers::is_no_core; πŸ”’
use crate::shims::global_ctor; πŸ”’
use crate::shims::tls; πŸ”’
use crate::*; πŸ”’

StructsΒ§

MiriConfig
Configuration needed to spawn a Miri instance.
ProgramExitHandler
A state machine that’s run when the program is exiting.

EnumsΒ§

ExitType
MainThreadState πŸ”’
The state of the main thread. Implementation detail of on_main_stack_empty.
MiriEntryFnType
ProgramExitState πŸ”’

ConstantsΒ§

THREAD_YIELDS_AT_EXIT πŸ”’
When the program exits, we will yield to any other thread that is ready to execute. But we must only do that a finite number of times, or a background thread running loop {} will hang the program.

FunctionsΒ§

args_to_utf16_command_string πŸ”’
Turns an array of arguments into a Windows command line string.
call_main πŸ”’
create_ecx
Returns a freshly created InterpCx. Public because this is also used by priroda.
entry_fn
Finds the entry point Miri should execute.
eval_entry
Evaluates the entry function specified by entry_id. Returns Ok(()) if program execution completed with exit code 0. Returns Err(code) if an evaluation error occurred or the program returned a non-0 exit code.