test memalign contract (rustc is fixed)

This commit is contained in:
Ralf Jung 2019-08-03 20:53:42 +02:00
parent f65e7cd2d1
commit 8d99e42f47

View File

@ -177,16 +177,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
if !align.is_power_of_two() {
throw_unsup!(HeapAllocNonPowerOfTwoAlignment(align));
}
/*
FIXME: This check is disabled because rustc violates it.
See <https://github.com/rust-lang/rust/issues/62251>.
if align < this.pointer_size().bytes() {
throw_ub_format!(
"posix_memalign: alignment must be at least the size of a pointer, but is {}",
align,
);
}
*/
if size == 0 {
this.write_null(ret.into())?;
} else {