Skip to content

Commit 8d99e42

Browse files
committed
test memalign contract (rustc is fixed)
1 parent f65e7cd commit 8d99e42

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/shims/foreign_items.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
177177
if !align.is_power_of_two() {
178178
throw_unsup!(HeapAllocNonPowerOfTwoAlignment(align));
179179
}
180-
/*
181-
FIXME: This check is disabled because rustc violates it.
182-
See <https://github.com/rust-lang/rust/issues/62251>.
183180
if align < this.pointer_size().bytes() {
184181
throw_ub_format!(
185182
"posix_memalign: alignment must be at least the size of a pointer, but is {}",
186183
align,
187184
);
188185
}
189-
*/
186+
190187
if size == 0 {
191188
this.write_null(ret.into())?;
192189
} else {

0 commit comments

Comments
 (0)