Skip to content

Commit 21fd5fd

Browse files
authored
Merge pull request #561 from solson/rustup
We don't need no whitelist
2 parents c9bb212 + 6df89de commit 21fd5fd

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

src/lib.rs

+2-19
Original file line numberDiff line numberDiff line change
@@ -310,26 +310,9 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for Evaluator<'tcx> {
310310

311311
const STATIC_KIND: Option<MiriMemoryKind> = Some(MiriMemoryKind::MutStatic);
312312

313+
#[inline(always)]
313314
fn enforce_validity(ecx: &EvalContext<'a, 'mir, 'tcx, Self>) -> bool {
314-
if !ecx.machine.validate {
315-
return false;
316-
}
317-
318-
// Some functions are whitelisted until we figure out how to fix them.
319-
// We walk up the stack a few frames to also cover their callees.
320-
const WHITELIST: &[(&str, &str)] = &[
321-
// Uses mem::uninitialized
322-
("std::sys::windows::mutex::Mutex::", ""),
323-
];
324-
for frame in ecx.stack().iter()
325-
.rev().take(3)
326-
{
327-
let name = frame.instance.to_string();
328-
if WHITELIST.iter().any(|(prefix, suffix)| name.starts_with(prefix) && name.ends_with(suffix)) {
329-
return false;
330-
}
331-
}
332-
true
315+
ecx.machine.validate
333316
}
334317

335318
/// Returns Ok() when the function was handled, fail otherwise

0 commit comments

Comments
 (0)