make execution with full MIR work: need to whitelist Arc drop impl and whatever it calls
This commit is contained in:
parent
c2c05014af
commit
85dc3e563e
@ -42,18 +42,24 @@ impl<'a, 'tcx, M: Machine<'tcx>> EvalContext<'a, 'tcx, M> {
|
||||
// HACK: Determine if this method is whitelisted and hence we do not perform any validation.
|
||||
// We currently insta-UB on anything passing around uninitialized memory, so we have to whitelist
|
||||
// the places that are allowed to do that.
|
||||
// The second group is stuff libstd does that is forbidden even under relaxed validation.
|
||||
{
|
||||
// The regexp we use for filtering
|
||||
use regex::Regex;
|
||||
lazy_static! {
|
||||
static ref RE: Regex = Regex::new("^(\
|
||||
std::mem::uninitialized::|\
|
||||
std::mem::forget::|\
|
||||
<std::heap::Heap as std::heap::Alloc>::|\
|
||||
<std::mem::ManuallyDrop<T>><.*>::new$|\
|
||||
<std::mem::ManuallyDrop<T> as std::ops::DerefMut><.*>::deref_mut$|\
|
||||
std::ptr::read::\
|
||||
)").unwrap();
|
||||
std::mem::uninitialized::|\
|
||||
std::mem::forget::|\
|
||||
<std::heap::Heap as std::heap::Alloc>::|\
|
||||
<std::mem::ManuallyDrop<T>><.*>::new$|\
|
||||
<std::mem::ManuallyDrop<T> as std::ops::DerefMut><.*>::deref_mut$|\
|
||||
std::ptr::read::|\
|
||||
\
|
||||
<std::sync::Arc<T>><.*>::inner$|\
|
||||
<std::sync::Arc<T>><.*>::drop_slow$|\
|
||||
std::heap::Layout::for_value::|\
|
||||
std::mem::(size|align)_of_val::\
|
||||
)").unwrap();
|
||||
}
|
||||
// Now test
|
||||
let name = self.stack[self.cur_frame()].instance.to_string();
|
||||
|
Loading…
x
Reference in New Issue
Block a user