Skip to content

Commit 2ba1e84

Browse files
committed
Auto merge of #1973 - RalfJung:rustup, r=RalfJung
implement const_allocate intrinsic This is needed to make the libcore test suite pass again.
2 parents a284d4f + dfa0a3b commit 2ba1e84

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4e8fb743ccbec27344b2dd42de7057f41d4ebfdd
1+
78450d2d602b06d9b94349aaf8cece1a4acaf3a8

src/shims/intrinsics.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
5454
let right = this.read_immediate(right)?;
5555
this.binop_ignore_overflow(mir::BinOp::Ne, &left, &right, dest)?;
5656
}
57+
"const_allocate" => {
58+
// For now, for compatibility with the run-time implementation of this, we just return null.
59+
// See <https://github.com/rust-lang/rust/issues/93935>.
60+
this.write_null(dest)?;
61+
}
5762

5863
// Raw memory accesses
5964
"volatile_load" => {

0 commit comments

Comments
 (0)