From 91127ac1fdd4d1ed8edb7736faa4d8d466e9d0a6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 26 Aug 2024 13:48:19 +0200 Subject: [PATCH] const-eval: do not make UbChecks behavior depend on current crate's flags --- src/machine.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/machine.rs b/src/machine.rs index a7493d48d6..f97b716e0b 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -1060,6 +1060,10 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> { ecx.generate_nan(inputs) } + fn ub_checks(ecx: &InterpCx<'tcx, Self>) -> InterpResult<'tcx, bool> { + Ok(ecx.tcx.sess.ub_checks()) + } + fn thread_local_static_pointer( ecx: &mut MiriInterpCx<'tcx>, def_id: DefId,