Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/vm/src/stdlib/posix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ pub mod module {
reinit_mutex_after_fork(&vm.state.atexit_funcs);
reinit_mutex_after_fork(&vm.state.global_trace_func);
reinit_mutex_after_fork(&vm.state.global_profile_func);
reinit_mutex_after_fork(&vm.state.monitoring);

// PyGlobalState parking_lot::Mutex locks
reinit_mutex_after_fork(&vm.state.thread_frames);
Expand Down
4 changes: 2 additions & 2 deletions crates/vm/src/stdlib/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,8 @@ pub(crate) mod _thread {
#[cfg(unix)]
fn reinit_parking_lot_mutex<T: ?Sized>(mutex: &parking_lot::Mutex<T>) {
unsafe {
let ptr = mutex as *const parking_lot::Mutex<T> as *mut u8;
core::ptr::write_bytes(ptr, 0, core::mem::size_of::<parking_lot::RawMutex>());
let raw = mutex.raw() as *const parking_lot::RawMutex as *mut u8;
core::ptr::write_bytes(raw, 0, core::mem::size_of::<parking_lot::RawMutex>());
}
}

Expand Down
Loading