Skip to content

Commit 83c78d4

Browse files
committed
Rename 'intercept' to 'shims'
1 parent 8b5c104 commit 83c78d4

15 files changed

+9
-9
lines changed

src/concurrency/genmc/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ use crate::*;
2727
mod config;
2828
mod global_allocations;
2929
mod helper;
30-
mod intercept;
30+
mod shims;
3131
mod run;
3232
pub(crate) mod scheduling;
3333
mod thread_id_map;
3434

3535
pub use genmc_sys::GenmcParams;
3636

3737
pub use self::config::GenmcConfig;
38-
pub use self::intercept::EvalContextExt as GenmcEvalContextExt;
38+
pub use self::shims::EvalContextExt as GenmcEvalContextExt;
3939
pub use self::run::run_genmc_mode;
4040

4141
#[derive(Debug)]
File renamed without changes.

tests/genmc/fail/intercept/mutex_diff_thread_unlock.rs renamed to tests/genmc/fail/shims/mutex_diff_thread_unlock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
// Test that GenMC throws an error if a `std::sync::Mutex` is unlocked from a different thread than the one that locked it.
55
//
6-
// GenMC assumes a `pthread`-like API, which does not allow unlocking a mutex from a different thread.
7-
// This test will cause an error on all platforms, even if that platform allows for unlocking on a different thread.
6+
// This test will cause an error on all targets, even mutexes on that targets allow for unlocking on a different thread.
7+
// GenMC always assumes a `pthread`-like API.
88

99
#![no_main]
1010

tests/genmc/fail/intercept/mutex_diff_thread_unlock.stderr renamed to tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ LL | | .compare_exchange_weak(state, state + READ_LOCKED, Acquir
2020
= note: inside `std::env::var_os::<&str>` at RUSTLIB/std/src/env.rs:LL:CC
2121
= note: inside closure at RUSTLIB/std/src/thread/mod.rs:LL:CC
2222
note: inside `miri_start`
23-
--> tests/genmc/fail/intercept/mutex_diff_thread_unlock.rs:LL:CC
23+
--> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC
2424
|
2525
LL | let handle = std::thread::spawn(move || {
2626
| __________________^
@@ -50,7 +50,7 @@ LL | | .compare_exchange_weak(state, state + READ_LOCKED, Acquir
5050
= note: inside `std::env::var_os::<&str>` at RUSTLIB/std/src/env.rs:LL:CC
5151
= note: inside closure at RUSTLIB/std/src/thread/mod.rs:LL:CC
5252
note: inside `miri_start`
53-
--> tests/genmc/fail/intercept/mutex_diff_thread_unlock.rs:LL:CC
53+
--> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC
5454
|
5555
LL | let handle = std::thread::spawn(move || {
5656
| __________________^
@@ -73,7 +73,7 @@ LL | self.lock.inner.unlock();
7373
= note: inside `std::ptr::drop_in_place::<EvilSend<std::sync::MutexGuard<'_, u64>>> - shim(Some(EvilSend<std::sync::MutexGuard<'_, u64>>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
7474
= note: inside `std::mem::drop::<EvilSend<std::sync::MutexGuard<'_, u64>>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
7575
note: inside closure
76-
--> tests/genmc/fail/intercept/mutex_diff_thread_unlock.rs:LL:CC
76+
--> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC
7777
|
7878
LL | drop(guard);
7979
| ^^^^^^^^^^^

tests/genmc/fail/intercept/mutex_double_unlock.rs renamed to tests/genmc/fail/shims/mutex_double_unlock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@compile-flags: -Zmiri-genmc -Zmiri-disable-stacked-borrows
22
//@error-in-other-file: Undefined Behavior
33

4-
// Test that GenMC can detect a double unlock of a `std::sync::Mutex`.
4+
// Test that GenMC can detect a double unlock of a mutex.
55

66
#![no_main]
77

tests/genmc/fail/intercept/mutex_double_unlock.stderr renamed to tests/genmc/fail/shims/mutex_double_unlock.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LL | self.lock.inner.unlock();
1212
= note: inside `std::ptr::drop_in_place::<std::sync::MutexGuard<'_, u64>> - shim(Some(std::sync::MutexGuard<'_, u64>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC
1313
= note: inside `std::mem::drop::<std::sync::MutexGuard<'_, u64>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC
1414
note: inside `miri_start`
15-
--> tests/genmc/fail/intercept/mutex_double_unlock.rs:LL:CC
15+
--> tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC
1616
|
1717
LL | drop(guard);
1818
| ^^^^^^^^^^^
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)