Skip to content

Commit c687342

Browse files
committed
Fix < vs <= error
1 parent 2b2cf4a commit c687342

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/concurrency/genmc/intercept.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
3030

3131
let size = mutex.layout.size.bytes();
3232
assert!(
33-
size < MAX_ACCESS_SIZE,
34-
"Mutex is larger than maximal size of a memory access supported by GenMC ({size} >= {MAX_ACCESS_SIZE})"
33+
size <= MAX_ACCESS_SIZE,
34+
"Mutex is larger than maximal size of a memory access supported by GenMC ({size} > {MAX_ACCESS_SIZE})"
3535
);
3636
let result = genmc_ctx.handle.borrow_mut().pin_mut().handle_mutex_lock(
3737
genmc_ctx.active_thread_genmc_tid(&this.machine),
@@ -100,8 +100,8 @@ trait EvalContextExtPriv<'tcx>: crate::MiriInterpCxExt<'tcx> {
100100
let genmc_ctx = this.machine.data_race.as_genmc_ref().unwrap();
101101
let size = mutex.layout.size.bytes();
102102
assert!(
103-
size < MAX_ACCESS_SIZE,
104-
"Mutex is larger than maximal size of a memory access supported by GenMC ({size} >= {MAX_ACCESS_SIZE})"
103+
size <= MAX_ACCESS_SIZE,
104+
"Mutex is larger than maximal size of a memory access supported by GenMC ({size} > {MAX_ACCESS_SIZE})"
105105
);
106106
let result = genmc_ctx.handle.borrow_mut().pin_mut().handle_mutex_try_lock(
107107
genmc_ctx.active_thread_genmc_tid(&this.machine),

0 commit comments

Comments
 (0)