usync 0.2.1
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: `usync` (lib) generated 3 warnings                                                                                                                                                                                                                     
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.03s                                                                                                                                                                                        
info: for the target platform, using target runner `/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri runner` defined by `target.cfg(all()).runner` specified by `--config`                                                              
info: for the host platform, using target runner `/root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo-miri runner` defined by `target.cfg(all()).runner` specified by `--config`                                                                
    Starting 68 tests across 1 binary (run ID: e4b1aa64-cd85-43d7-81d9-94e1d1825551, nextest profile: default-miri)                                                                                                                                             
        FAIL [   4.237s] usync condvar::tests::notify_all                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::tests::notify_all ---                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::tests::notify_all ---                                                                                                                                                                                                   
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
11  |     addr as *mut T                                                                                                                                                                                                                                        
    |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                                
    |                                                                                                                                                                                                                                                           
    = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                    
    = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                      
    = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                   
    = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                 
    = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                                
    = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                       
    = note: BACKTRACE on thread `condvar::tests:`:                                                                                                                                                                                                              
    = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                            
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
   --> src/condvar.rs:115:35                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
115 |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                    
    |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      
note: inside `condvar::tests::notify_all`                                                                                                                                                                                                                       
   --> src/condvar.rs:627:45                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
627 |         let data = Arc::new((Mutex::new(0), Condvar::new()));                                                                                                                                                                                             
    |                                             ^^^^^^^^^^^^^^                                                                                                                                                                                                
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:624:20                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
623 |     #[test]                                                                                                                                                                                                                                               
    |     ------- in this procedural macro expansion                                                                                                                                                                                                            
624 |     fn notify_all() {                                                                                                                                                                                                                                     
    |                    ^                                                                                                                                                                                                                                      
    = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
65  | /             NonNull::from(self)                                                                                                                                                                                                                         
66  | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                  
67  | |                 .as_ref()                                                                                                                                                                                                                               
68  | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                         
    | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                 
    |                                                                                                                                                                                                                                                           
    = note: BACKTRACE on thread `condvar::tests:`:                                                                                                                                                                                                              
    = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                  
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
   --> src/rwlock.rs:631:21                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
631 | /                     self.state                                                                                                                                                                                                                          
632 | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                                
    | |_______________________________________________________________________________________^                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
   --> src/rwlock.rs:293:17                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
293 |                 self.unpark(new_state);                                                                                                                                                                                                                   
    |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
   --> src/rwlock.rs:259:13                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
259 |             self.unlock_and_unpark();                                                                                                                                                                                                                     
    |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
   --> src/rwlock.rs:99:9                                                                                                                                                                                                                                       
    |                                                                                                                                                                                                                                                           
99  |         self.unlock_exclusive_fast()                                                                                                                                                                                                                      
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
   --> src/mutex.rs:42:9                                                                                                                                                                                                                                        
    |                                                                                                                                                                                                                                                           
42  |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                    
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
    = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, usize> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                                                       
    = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, usize>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, usize>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
    = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, usize>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25                                            
note: inside `condvar::tests::notify_all`                                                                                                                                                                                                                       
   --> src/condvar.rs:652:9                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
652 |         drop(cnt);                                                                                                                                                                                                                                        
    |         ^^^^^^^^^                                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:624:20                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
623 |     #[test]                                                                                                                                                                                                                                               
    |     ------- in this procedural macro expansion                                                                                                                                                                                                            
624 |     fn notify_all() {                                                                                                                                                                                                                                     
    |                    ^                                                                                                                                                                                                                                      
    = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x1dfec0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
   --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                   
    |                                                                                                                                                                                                                                                           
402 |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                           
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x1dfec0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                   
    |                                                                                                                                                                                                                                                           
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                               
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                          
    = note: BACKTRACE on thread `unnamed-11`:                                                                                                                                                                                                                   
    = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                                
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
   --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                               
    |                                                                                                                                                                                                                                                           
58  |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                           
    |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                          
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
   --> src/rwlock.rs:619:32                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
619 |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                 
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                  
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
   --> src/rwlock.rs:293:17                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
293 |                 self.unpark(new_state);                                                                                                                                                                                                                   
    |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
   --> src/rwlock.rs:259:13                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
259 |             self.unlock_and_unpark();                                                                                                                                                                                                                     
    |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
   --> src/rwlock.rs:99:9                                                                                                                                                                                                                                       
    |                                                                                                                                                                                                                                                           
99  |         self.unlock_exclusive_fast()                                                                                                                                                                                                                      
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
   --> src/mutex.rs:42:9                                                                                                                                                                                                                                        
    |                                                                                                                                                                                                                                                           
42  |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                    
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
    = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, usize> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                                                       
    = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, usize>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, usize>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:643:13                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
643 |             });                                                                                                                                                                                                                                           
    |             ^                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   3.943s] usync condvar::tests::notify_all_return                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::tests::notify_all_return ---                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::tests::notify_all_return ---                                                                                                                                                                                            
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
11  |     addr as *mut T                                                                                                                                                                                                                                        
    |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                                
    |                                                                                                                                                                                                                                                           
    = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                    
    = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                      
    = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                   
    = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                 
    = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                                
    = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                       
    = note: BACKTRACE on thread `condvar::tests:`:                                                                                                                                                                                                              
    = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                            
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
   --> src/condvar.rs:115:35                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
115 |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                    
    |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      
note: inside `condvar::tests::notify_all_return`                                                                                                                                                                                                                
   --> src/condvar.rs:689:45                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
689 |         let data = Arc::new((Mutex::new(0), Condvar::new()));                                                                                                                                                                                             
    |                                             ^^^^^^^^^^^^^^                                                                                                                                                                                                
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:686:27                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
685 |     #[test]                                                                                                                                                                                                                                               
    |     ------- in this procedural macro expansion                                                                                                                                                                                                            
686 |     fn notify_all_return() {                                                                                                                                                                                                                              
    |                           ^                                                                                                                                                                                                                               
    = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
65  | /             NonNull::from(self)                                                                                                                                                                                                                         
66  | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                  
67  | |                 .as_ref()                                                                                                                                                                                                                               
68  | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                         
    | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                 
    |                                                                                                                                                                                                                                                           
    = note: BACKTRACE on thread `condvar::tests:`:                                                                                                                                                                                                              
    = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                  
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
   --> src/rwlock.rs:631:21                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
631 | /                     self.state                                                                                                                                                                                                                          
632 | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                                
    | |_______________________________________________________________________________________^                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
   --> src/rwlock.rs:293:17                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
293 |                 self.unpark(new_state);                                                                                                                                                                                                                   
    |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
   --> src/rwlock.rs:259:13                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
259 |             self.unlock_and_unpark();                                                                                                                                                                                                                     
    |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
   --> src/rwlock.rs:99:9                                                                                                                                                                                                                                       
    |                                                                                                                                                                                                                                                           
99  |         self.unlock_exclusive_fast()                                                                                                                                                                                                                      
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
   --> src/mutex.rs:42:9                                                                                                                                                                                                                                        
    |                                                                                                                                                                                                                                                           
42  |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                    
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
    = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, usize> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                                                       
    = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, usize>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, usize>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
    = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, usize>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25                                            
note: inside `condvar::tests::notify_all_return`                                                                                                                                                                                                                
   --> src/condvar.rs:714:9                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
714 |         drop(cnt);                                                                                                                                                                                                                                        
    |         ^^^^^^^^^                                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:686:27                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
685 |     #[test]                                                                                                                                                                                                                                               
    |     ------- in this procedural macro expansion                                                                                                                                                                                                            
686 |     fn notify_all_return() {                                                                                                                                                                                                                              
    |                           ^                                                                                                                                                                                                                               
    = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x1df450[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
   --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                   
    |                                                                                                                                                                                                                                                           
402 |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                           
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x1df450[noalloc] is a dangling pointer (it has no provenance)                                                                                                                   
    |                                                                                                                                                                                                                                                           
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                               
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                          
    = note: BACKTRACE on thread `unnamed-11`:                                                                                                                                                                                                                   
    = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                                
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
   --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                               
    |                                                                                                                                                                                                                                                           
58  |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                           
    |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                          
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
   --> src/rwlock.rs:619:32                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
619 |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                 
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                  
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
   --> src/rwlock.rs:293:17                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
293 |                 self.unpark(new_state);                                                                                                                                                                                                                   
    |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
   --> src/rwlock.rs:259:13                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
259 |             self.unlock_and_unpark();                                                                                                                                                                                                                     
    |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
   --> src/rwlock.rs:99:9                                                                                                                                                                                                                                       
    |                                                                                                                                                                                                                                                           
99  |         self.unlock_exclusive_fast()                                                                                                                                                                                                                      
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
   --> src/mutex.rs:42:9                                                                                                                                                                                                                                        
    |                                                                                                                                                                                                                                                           
42  |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                    
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
    = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, usize> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                                                       
    = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, usize>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, usize>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:705:13                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
705 |             });                                                                                                                                                                                                                                           
    |             ^                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        PASS [   2.754s] usync condvar::tests::notify_one                                                                                                                                                                                                       
        PASS [   2.776s] usync condvar::tests::notify_one_return_false                                                                                                                                                                                          
        PASS [   2.921s] usync condvar::tests::notify_one_return_true                                                                                                                                                                                           
        PASS [   2.859s] usync condvar::tests::smoke                                                                                                                                                                                                            
        PASS [   2.926s] usync condvar::tests::test_condvar_requeue                                                                                                                                                                                             
        PASS [   2.991s] usync condvar::tests::test_debug_condvar                                                                                                                                                                                               
        FAIL [   3.561s] usync condvar::tests::test_parking_lot_issue_129                                                                                                                                                                                       
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::tests::test_parking_lot_issue_129 ---                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::tests::test_parking_lot_issue_129 ---                                                                                                                                                                                   
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
11  |     addr as *mut T                                                                                                                                                                                                                                        
    |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                                
    |                                                                                                                                                                                                                                                           
    = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                    
    = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                      
    = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                   
    = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                 
    = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                                
    = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                       
    = note: BACKTRACE on thread `condvar::tests:`:                                                                                                                                                                                                              
    = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                            
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
   --> src/condvar.rs:115:35                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
115 |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                    
    |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      
note: inside `condvar::tests::test_parking_lot_issue_129`                                                                                                                                                                                                       
   --> src/condvar.rs:854:47                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
854 |         let locks = Arc::new((Mutex::new(()), Condvar::new()));                                                                                                                                                                                           
    |                                               ^^^^^^^^^^^^^^                                                                                                                                                                                              
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:853:36                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
852 |     #[test]                                                                                                                                                                                                                                               
    |     ------- in this procedural macro expansion                                                                                                                                                                                                            
853 |     fn test_parking_lot_issue_129() {                                                                                                                                                                                                                     
    |                                    ^                                                                                                                                                                                                                      
    = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
65  | /             NonNull::from(self)                                                                                                                                                                                                                         
66  | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                  
67  | |                 .as_ref()                                                                                                                                                                                                                               
68  | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                         
    | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                 
    |                                                                                                                                                                                                                                                           
    = note: BACKTRACE on thread `unnamed-2`:                                                                                                                                                                                                                    
    = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                  
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
   --> src/rwlock.rs:631:21                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
631 | /                     self.state                                                                                                                                                                                                                          
632 | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                                
    | |_______________________________________________________________________________________^                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
   --> src/rwlock.rs:293:17                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
293 |                 self.unpark(new_state);                                                                                                                                                                                                                   
    |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
   --> src/rwlock.rs:259:13                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
259 |             self.unlock_and_unpark();                                                                                                                                                                                                                     
    |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
   --> src/rwlock.rs:99:9                                                                                                                                                                                                                                       
    |                                                                                                                                                                                                                                                           
99  |         self.unlock_exclusive_fast()                                                                                                                                                                                                                      
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
   --> src/mutex.rs:42:9                                                                                                                                                                                                                                        
    |                                                                                                                                                                                                                                                           
42  |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                    
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
    = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, ()> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                                                          
    = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, ()>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, ()>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:866:13                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
866 |             });                                                                                                                                                                                                                                           
    |             ^                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x25b500[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
   --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                   
    |                                                                                                                                                                                                                                                           
402 |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                           
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x25b500[noalloc] is a dangling pointer (it has no provenance)                                                                                                                   
    |                                                                                                                                                                                                                                                           
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                               
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                          
    = note: BACKTRACE on thread `unnamed-5`:                                                                                                                                                                                                                    
    = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                                
note: inside closure                                                                                                                                                                                                                                            
   --> src/shared/waiter.rs:66:17                                                                                                                                                                                                                               
    |                                                                                                                                                                                                                                                           
66  |                 next.as_ref().prev.set(Some(current));                                                                                                                                                                                                    
    |                 ^^^^^^^^^^^^^                                                                                                                                                                                                                             
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:576:55: 576:58}>`                                                                                                                                                             
   --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                               
    |                                                                                                                                                                                                                                                           
58  |           let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                         
    |  ____________________^                                                                                                                                                                                                                                    
59  | |             let mut current = head;                                                                                                                                                                                                                     
60  | |             loop {                                                                                                                                                                                                                                      
61  | |                 // Scan through the link following the `next` fields to find the tail of the queue.                                                                                                                                                     
...   |                                                                                                                                                                                                                                                         
77  | |             }                                                                                                                                                                                                                                           
78  | |         });                                                                                                                                                                                                                                             
    | |__________^                                                                                                                                                                                                                                              
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
   --> src/rwlock.rs:576:21                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
576 |             let _ = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                            
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
   --> src/rwlock.rs:553:13                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
553 |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                         
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                          
note: inside `rwlock::RawRwLock::try_requeue`                                                                                                                                                                                                                   
   --> src/rwlock.rs:502:16                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
502 |             if self.try_queue(&mut state, waiter.as_ref()) {                                                                                                                                                                                              
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                
note: inside `condvar::Condvar::unpark_requeue`                                                                                                                                                                                                                 
   --> src/condvar.rs:572:17                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
572 |             if !raw_rwlock.as_ref().try_requeue(waiter) {                                                                                                                                                                                                 
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::Condvar::unpark`                                                                                                                                                                                                                         
   --> src/condvar.rs:529:33                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
529 |                 Ok(_) => return self.unpark_requeue(head),                                                                                                                                                                                                
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside `condvar::Condvar::notify_one_slow`                                                                                                                                                                                                                
   --> src/condvar.rs:359:26                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
359 |                 unsafe { self.unpark(new_state, 1) };                                                                                                                                                                                                     
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::notify_one`                                                                                                                                                                                                                     
   --> src/condvar.rs:336:9                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
336 |         self.notify_one_slow(state)                                                                                                                                                                                                                       
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                       
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:864:17                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
864 |                 locks.1.notify_one();                                                                                                                                                                                                                     
    |                 ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   3.091s] usync condvar::tests::two_mutexes                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::tests::two_mutexes ---                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::tests::two_mutexes ---                                                                                                                                                                                                  
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
   --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
11  |     addr as *mut T                                                                                                                                                                                                                                        
    |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                                
    |                                                                                                                                                                                                                                                           
    = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                    
    = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                      
    = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                   
    = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                 
    = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                                
    = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                       
    = note: BACKTRACE on thread `condvar::tests:`:                                                                                                                                                                                                              
    = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                            
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
   --> src/condvar.rs:115:35                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
115 |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                    
    |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      
note: inside `condvar::tests::two_mutexes`                                                                                                                                                                                                                      
   --> src/condvar.rs:771:26                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
771 |         let c = Arc::new(Condvar::new());                                                                                                                                                                                                                 
    |                          ^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:767:21                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
766 |     #[test]                                                                                                                                                                                                                                               
    |     ------- in this procedural macro expansion                                                                                                                                                                                                            
767 |     fn two_mutexes() {                                                                                                                                                                                                                                    
    |                     ^                                                                                                                                                                                                                                     
    = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                                
                                                                                                                                                                                                                                                                
error: Undefined Behavior: deallocating while item [SharedReadOnly for <286121>] is strongly protected by call 68310                                                                                                                                            
   --> src/shared/event.rs:31:5                                                                                                                                                                                                                                 
    |                                                                                                                                                                                                                                                           
31  |     }                                                                                                                                                                                                                                                     
    |     ^ deallocating while item [SharedReadOnly for <286121>] is strongly protected by call 68310                                                                                                                                                           
    |                                                                                                                                                                                                                                                           
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental                                                                                                  
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information                                                                                                                                  
    = note: BACKTRACE on thread `unnamed-2`:                                                                                                                                                                                                                    
    = note: inside `shared::event::Event::with::<bool, {closure@src/shared/parker.rs:48:21: 48:25}>` at src/shared/event.rs:31:5: 31:6                                                                                                                          
note: inside `shared::parker::Parker::park_slow`                                                                                                                                                                                                                
   --> src/shared/parker.rs:48:9                                                                                                                                                                                                                                
    |                                                                                                                                                                                                                                                           
48  | / ...   Event::with(|ev| {                                                                                                                                                                                                                                
49  | | ...       // Register our event for waiting, bailing out if we we're notified.                                                                                                                                                                          
50  | | ...       // AcqRel as Release on success which ensures the ev writes in Event::with() happen before unpark() tries t...                                                                                                                                
51  | | ...       // Acquire on failure to ensure that the unpark() happens before we return.                                                                                                                                                                   
...   |                                                                                                                                                                                                                                                         
83  | | ...       self.park_complete(event)                                                                                                                                                                                                                     
84  | | ...   })                                                                                                                                                                                                                                                
    | |________^                                                                                                                                                                                                                                                
note: inside `shared::parker::Parker::park`                                                                                                                                                                                                                     
   --> src/shared/parker.rs:36:24                                                                                                                                                                                                                               
    |                                                                                                                                                                                                                                                           
36  |                 return self.park_slow(timeout);                                                                                                                                                                                                           
    |                        ^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                            
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:259:30                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
259 |             let timed_out = !waiter.parker.park(timeout);                                                                                                                                                                                                 
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                  
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
   --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                                
    |                                                                                                                                                                                                                                                           
47  |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                         
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `condvar::Condvar::wait_with::<()>`                                                                                                                                                                                                                
   --> src/condvar.rs:193:9                                                                                                                                                                                                                                     
    |                                                                                                                                                                                                                                                           
193 | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                  
194 | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                   
195 | |             let is_writer = true;                                                                                                                                                                                                                       
196 | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                       
...   |                                                                                                                                                                                                                                                         
271 | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                                
272 | |         })                                                                                                                                                                                                                                              
    | |__________^                                                                                                                                                                                                                                              
note: inside `condvar::Condvar::wait::<()>`                                                                                                                                                                                                                     
   --> src/condvar.rs:128:22                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
128 |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                   
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside closure                                                                                                                                                                                                                                            
   --> src/condvar.rs:787:13                                                                                                                                                                                                                                    
    |                                                                                                                                                                                                                                                           
787 |             c2.wait(&mut g);                                                                                                                                                                                                                              
    |             ^^^^^^^^^^^^^^^                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 4 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        PASS [   3.098s] usync condvar::tests::two_mutexes_disjoint                                                                                                                                                                                             
        PASS [   3.164s] usync condvar::tests::wait_for                                                                                                                                                                                                         
        PASS [   2.950s] usync condvar::tests::wait_until                                                                                                                                                                                                       
        FAIL [   3.031s] usync condvar::webkit_queue_test::new_test_without_timeout_5                                                                                                                                                                           
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::new_test_without_timeout_5 ---                                                                                                                                                                       
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::new_test_without_timeout_5 ---                                                                                                                                                                       
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::new_test_without_timeout_5`                                                                                                                                                                                           
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-7`:                                                                                                                                                                                                                   
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:570:24                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
570  |                 return self.unpark(state);                                                                                                                                                                                                               
     |                        ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::try_requeue`                                                                                                                                                                                                                   
    --> src/rwlock.rs:502:16                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
502  |             if self.try_queue(&mut state, waiter.as_ref()) {                                                                                                                                                                                             
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                               
note: inside `condvar::Condvar::unpark_requeue`                                                                                                                                                                                                                 
    --> src/condvar.rs:572:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
572  |             if !raw_rwlock.as_ref().try_requeue(waiter) {                                                                                                                                                                                                
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                  
note: inside `condvar::Condvar::unpark_waiters`                                                                                                                                                                                                                 
    --> src/condvar.rs:552:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
552  |         self.unpark_requeue(head)                                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                        
note: inside `condvar::Condvar::notify_all_slow`                                                                                                                                                                                                                
    --> src/condvar.rs:423:26                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
423  |                 unsafe { self.unpark_waiters(state) };                                                                                                                                                                                                   
     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      
note: inside `condvar::Condvar::notify_all`                                                                                                                                                                                                                     
    --> src/condvar.rs:400:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
400  |         self.notify_all_slow(state)                                                                                                                                                                                                                      
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `condvar::webkit_queue_test::notify`                                                                                                                                                                                                               
    --> src/condvar.rs:934:21                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
934  |                     condition.notify_all();                                                                                                                                                                                                              
     |                     ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1066:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1066 |                 notify(notify_style, &*empty_condition, should_notify);                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x204080[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x204080[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-6`:                                                                                                                                                                                                                   
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:249:13                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
249  |             raw_mutex.unlock();                                                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                           
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        PASS [   4.124s] usync condvar::webkit_queue_test::one_producer_one_consumer_hundred_slots                                                                                                                                                              
        PASS [   8.076s] usync condvar::webkit_queue_test::one_producer_one_consumer_one_slot                                                                                                                                                                   
        PASS [   7.652s] usync condvar::webkit_queue_test::one_producer_one_consumer_one_slot_timeout                                                                                                                                                           
        FAIL [   3.461s] usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_all                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_all ---                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_all ---                                                                                                                                              
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_all`                                                                                                                                                                  
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-9`:                                                                                                                                                                                                                   
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:249:13                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
249  |             raw_mutex.unlock();                                                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                           
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x2ac220[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x2ac220[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-5`:                                                                                                                                                                                                                   
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/shared/waiter.rs:66:17                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
66   |                 next.as_ref().prev.set(Some(current));                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^                                                                                                                                                                                                                            
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:576:55: 576:58}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |           let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                        
     |  ____________________^                                                                                                                                                                                                                                   
59   | |             let mut current = head;                                                                                                                                                                                                                    
60   | |             loop {                                                                                                                                                                                                                                     
61   | |                 // Scan through the link following the `next` fields to find the tail of the queue.                                                                                                                                                    
...    |                                                                                                                                                                                                                                                        
77   | |             }                                                                                                                                                                                                                                          
78   | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:576:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
576  |             let _ = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                           
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                            
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/rwlock.rs:477:33                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
477  |                     if unsafe { self.try_queue(&mut state, waiter.as_ref()) } {                                                                                                                                                                          
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside `shared::waiter::Waiter::with::<(), {closure@src/rwlock.rs:449:22: 449:30}>`                                                                                                                                                                       
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `rwlock::RawRwLock::lock_common::<{closure@src/rwlock.rs:427:24: 427:60}>`                                                                                                                                                                         
    --> src/rwlock.rs:449:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
449  | /         Waiter::with(|waiter| {                                                                                                                                                                                                                        
450  | |             waiter.waiting_on.set(Some(NonNull::from(self).cast()));                                                                                                                                                                                   
451  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
482  | |             }                                                                                                                                                                                                                                          
483  | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::lock_exclusive_slow`                                                                                                                                                                                                           
    --> src/rwlock.rs:434:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
434  |         self.lock_common(is_writer, try_lock)                                                                                                                                                                                                            
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                            
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::lock_exclusive`                                                                                                                                                                                       
    --> src/rwlock.rs:93:13                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
93   |             self.lock_exclusive_slow();                                                                                                                                                                                                                  
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `<mutex::RawMutex as lock_api::RawMutex>::lock`                                                                                                                                                                                                    
    --> src/mutex.rs:32:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
32   |         self.rwlock.lock_exclusive()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<condvar::Condvar::wait_with::{closure#0}::DropGuard<'_> as std::ops::Drop>::drop`                                                                                                                                                                
    --> src/condvar.rs:243:21                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
243  |                     self.0.lock();                                                                                                                                                                                                                       
     |                     ^^^^^^^^^^^^^                                                                                                                                                                                                                        
     = note: inside `std::ptr::drop_in_place::<condvar::Condvar::wait_with::{closure#0}::DropGuard<'_>> - shim(Some(condvar::Condvar::wait_with::{closure#0}::DropGuard<'_>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:272:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
272  |         })                                                                                                                                                                                                                                               
     |         ^                                                                                                                                                                                                                                                
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   3.571s] usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_one                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_one ---                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_one ---                                                                                                                                              
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_one`                                                                                                                                                                  
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-11`:                                                                                                                                                                                                                  
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:570:24                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
570  |                 return self.unpark(state);                                                                                                                                                                                                               
     |                        ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::try_requeue`                                                                                                                                                                                                                   
    --> src/rwlock.rs:502:16                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
502  |             if self.try_queue(&mut state, waiter.as_ref()) {                                                                                                                                                                                             
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                               
note: inside `condvar::Condvar::unpark_requeue`                                                                                                                                                                                                                 
    --> src/condvar.rs:572:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
572  |             if !raw_rwlock.as_ref().try_requeue(waiter) {                                                                                                                                                                                                
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                  
note: inside `condvar::Condvar::unpark`                                                                                                                                                                                                                         
    --> src/condvar.rs:511:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
511  |                     Ok(_) => return self.unpark_requeue(front),                                                                                                                                                                                          
     |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                           
note: inside `condvar::Condvar::link_queue_or_unpark`                                                                                                                                                                                                           
    --> src/condvar.rs:284:24                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
284  |                 return self.unpark(state, 0);                                                                                                                                                                                                            
     |                        ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                             
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:255:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
255  |                 self.link_queue_or_unpark(state);                                                                                                                                                                                                        
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x2eefe0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x2eefe0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-2`:                                                                                                                                                                                                                   
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:249:13                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
249  |             raw_mutex.unlock();                                                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                           
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   3.455s] usync condvar::webkit_queue_test::one_producer_ten_consumers_one_slot                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::one_producer_ten_consumers_one_slot ---                                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::one_producer_ten_consumers_one_slot ---                                                                                                                                                              
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::one_producer_ten_consumers_one_slot`                                                                                                                                                                                  
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-10`:                                                                                                                                                                                                                  
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:570:24                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
570  |                 return self.unpark(state);                                                                                                                                                                                                               
     |                        ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/rwlock.rs:477:33                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
477  |                     if unsafe { self.try_queue(&mut state, waiter.as_ref()) } {                                                                                                                                                                          
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside `shared::waiter::Waiter::with::<(), {closure@src/rwlock.rs:449:22: 449:30}>`                                                                                                                                                                       
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `rwlock::RawRwLock::lock_common::<{closure@src/rwlock.rs:427:24: 427:60}>`                                                                                                                                                                         
    --> src/rwlock.rs:449:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
449  | /         Waiter::with(|waiter| {                                                                                                                                                                                                                        
450  | |             waiter.waiting_on.set(Some(NonNull::from(self).cast()));                                                                                                                                                                                   
451  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
482  | |             }                                                                                                                                                                                                                                          
483  | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::lock_exclusive_slow`                                                                                                                                                                                                           
    --> src/rwlock.rs:434:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
434  |         self.lock_common(is_writer, try_lock)                                                                                                                                                                                                            
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                            
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::lock_exclusive`                                                                                                                                                                                       
    --> src/rwlock.rs:93:13                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
93   |             self.lock_exclusive_slow();                                                                                                                                                                                                                  
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `<mutex::RawMutex as lock_api::RawMutex>::lock`                                                                                                                                                                                                    
    --> src/mutex.rs:32:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
32   |         self.rwlock.lock_exclusive()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<condvar::Condvar::wait_with::{closure#0}::DropGuard<'_> as std::ops::Drop>::drop`                                                                                                                                                                
    --> src/condvar.rs:243:21                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
243  |                     self.0.lock();                                                                                                                                                                                                                       
     |                     ^^^^^^^^^^^^^                                                                                                                                                                                                                        
     = note: inside `std::ptr::drop_in_place::<condvar::Condvar::wait_with::{closure#0}::DropGuard<'_>> - shim(Some(condvar::Condvar::wait_with::{closure#0}::DropGuard<'_>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:272:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
272  |         })                                                                                                                                                                                                                                               
     |         ^                                                                                                                                                                                                                                                
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x252120[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x252120[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-12`:                                                                                                                                                                                                                  
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/shared/waiter.rs:66:17                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
66   |                 next.as_ref().prev.set(Some(current));                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^                                                                                                                                                                                                                            
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:576:55: 576:58}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |           let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                        
     |  ____________________^                                                                                                                                                                                                                                   
59   | |             let mut current = head;                                                                                                                                                                                                                    
60   | |             loop {                                                                                                                                                                                                                                     
61   | |                 // Scan through the link following the `next` fields to find the tail of the queue.                                                                                                                                                    
...    |                                                                                                                                                                                                                                                        
77   | |             }                                                                                                                                                                                                                                          
78   | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:576:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
576  |             let _ = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                           
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                            
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/rwlock.rs:477:33                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
477  |                     if unsafe { self.try_queue(&mut state, waiter.as_ref()) } {                                                                                                                                                                          
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside `shared::waiter::Waiter::with::<(), {closure@src/rwlock.rs:449:22: 449:30}>`                                                                                                                                                                       
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `rwlock::RawRwLock::lock_common::<{closure@src/rwlock.rs:427:24: 427:60}>`                                                                                                                                                                         
    --> src/rwlock.rs:449:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
449  | /         Waiter::with(|waiter| {                                                                                                                                                                                                                        
450  | |             waiter.waiting_on.set(Some(NonNull::from(self).cast()));                                                                                                                                                                                   
451  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
482  | |             }                                                                                                                                                                                                                                          
483  | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::lock_exclusive_slow`                                                                                                                                                                                                           
    --> src/rwlock.rs:434:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
434  |         self.lock_common(is_writer, try_lock)                                                                                                                                                                                                            
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                            
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::lock_exclusive`                                                                                                                                                                                       
    --> src/rwlock.rs:93:13                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
93   |             self.lock_exclusive_slow();                                                                                                                                                                                                                  
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `<mutex::RawMutex as lock_api::RawMutex>::lock`                                                                                                                                                                                                    
    --> src/mutex.rs:32:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
32   |         self.rwlock.lock_exclusive()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
     = note: inside `lock_api::Mutex::<mutex::RawMutex, condvar::webkit_queue_test::Queue>::lock` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:223:9: 223:24                                                      
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1054:37                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1054 |                     let mut queue = queue.lock();                                                                                                                                                                                                        
     |                                     ^^^^^^^^^^^^                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        PASS [   7.245s] usync condvar::webkit_queue_test::sanity_check_queue                                                                                                                                                                                   
        PASS [   7.619s] usync condvar::webkit_queue_test::sanity_check_queue_timeout                                                                                                                                                                           
        FAIL [   4.264s] usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_all                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_all ---                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_all ---                                                                                                                                              
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_all`                                                                                                                                                                  
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-11`:                                                                                                                                                                                                                  
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:570:24                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
570  |                 return self.unpark(state);                                                                                                                                                                                                               
     |                        ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::try_requeue`                                                                                                                                                                                                                   
    --> src/rwlock.rs:502:16                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
502  |             if self.try_queue(&mut state, waiter.as_ref()) {                                                                                                                                                                                             
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                               
note: inside `condvar::Condvar::unpark_requeue`                                                                                                                                                                                                                 
    --> src/condvar.rs:572:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
572  |             if !raw_rwlock.as_ref().try_requeue(waiter) {                                                                                                                                                                                                
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                  
note: inside `condvar::Condvar::unpark_waiters`                                                                                                                                                                                                                 
    --> src/condvar.rs:552:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
552  |         self.unpark_requeue(head)                                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                        
note: inside `condvar::Condvar::unpark_all`                                                                                                                                                                                                                     
    --> src/condvar.rs:543:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
543  |         self.unpark_waiters(state)                                                                                                                                                                                                                       
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                       
note: inside `condvar::Condvar::unpark`                                                                                                                                                                                                                         
    --> src/condvar.rs:458:24                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
458  |                 return self.unpark_all();                                                                                                                                                                                                                
     |                        ^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                 
note: inside `condvar::Condvar::link_queue_or_unpark`                                                                                                                                                                                                           
    --> src/condvar.rs:284:24                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
284  |                 return self.unpark(state, 0);                                                                                                                                                                                                            
     |                        ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                             
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:255:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
255  |                 self.link_queue_or_unpark(state);                                                                                                                                                                                                        
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1058:25: 1058:32}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1055:21                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1055 | /                     wait(                                                                                                                                                                                                                              
1056 | |                         &*full_condition,                                                                                                                                                                                                              
1057 | |                         &mut queue,                                                                                                                                                                                                                    
1058 | |                         |state| state.items.len() < max_queue_size,                                                                                                                                                                                    
1059 | |                         &timeout,                                                                                                                                                                                                                      
1060 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x28c670[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x28c670[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-2`:                                                                                                                                                                                                                   
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
     = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                          
     = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
     = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1031:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1031 |                 std::mem::drop(queue);                                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   5.297s] usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_one                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_one ---                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_one ---                                                                                                                                              
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_one`                                                                                                                                                                  
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-5`:                                                                                                                                                                                                                   
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:249:13                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
249  |             raw_mutex.unlock();                                                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                           
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1058:25: 1058:32}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1055:21                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1055 | /                     wait(                                                                                                                                                                                                                              
1056 | |                         &*full_condition,                                                                                                                                                                                                              
1057 | |                         &mut queue,                                                                                                                                                                                                                    
1058 | |                         |state| state.items.len() < max_queue_size,                                                                                                                                                                                    
1059 | |                         &timeout,                                                                                                                                                                                                                      
1060 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x470190[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x470190[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-10`:                                                                                                                                                                                                                  
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:249:13                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
249  |             raw_mutex.unlock();                                                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                           
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1058:25: 1058:32}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1055:21                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1055 | /                     wait(                                                                                                                                                                                                                              
1056 | |                         &*full_condition,                                                                                                                                                                                                              
1057 | |                         &mut queue,                                                                                                                                                                                                                    
1058 | |                         |state| state.items.len() < max_queue_size,                                                                                                                                                                                    
1059 | |                         &timeout,                                                                                                                                                                                                                      
1060 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   2.973s] usync condvar::webkit_queue_test::ten_producers_one_consumer_one_slot                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::ten_producers_one_consumer_one_slot ---                                                                                                                                                              
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::ten_producers_one_consumer_one_slot ---                                                                                                                                                              
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::ten_producers_one_consumer_one_slot`                                                                                                                                                                                  
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-7`:                                                                                                                                                                                                                   
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:570:24                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
570  |                 return self.unpark(state);                                                                                                                                                                                                               
     |                        ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/rwlock.rs:477:33                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
477  |                     if unsafe { self.try_queue(&mut state, waiter.as_ref()) } {                                                                                                                                                                          
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside `shared::waiter::Waiter::with::<(), {closure@src/rwlock.rs:449:22: 449:30}>`                                                                                                                                                                       
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `rwlock::RawRwLock::lock_common::<{closure@src/rwlock.rs:427:24: 427:60}>`                                                                                                                                                                         
    --> src/rwlock.rs:449:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
449  | /         Waiter::with(|waiter| {                                                                                                                                                                                                                        
450  | |             waiter.waiting_on.set(Some(NonNull::from(self).cast()));                                                                                                                                                                                   
451  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
482  | |             }                                                                                                                                                                                                                                          
483  | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::lock_exclusive_slow`                                                                                                                                                                                                           
    --> src/rwlock.rs:434:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
434  |         self.lock_common(is_writer, try_lock)                                                                                                                                                                                                            
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                            
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::lock_exclusive`                                                                                                                                                                                       
    --> src/rwlock.rs:93:13                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
93   |             self.lock_exclusive_slow();                                                                                                                                                                                                                  
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `<mutex::RawMutex as lock_api::RawMutex>::lock`                                                                                                                                                                                                    
    --> src/mutex.rs:32:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
32   |         self.rwlock.lock_exclusive()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
     = note: inside `lock_api::Mutex::<mutex::RawMutex, condvar::webkit_queue_test::Queue>::lock` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:223:9: 223:24                                                      
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1054:37                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1054 |                     let mut queue = queue.lock();                                                                                                                                                                                                        
     |                                     ^^^^^^^^^^^^                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x23ee60[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x23ee60[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-2`:                                                                                                                                                                                                                   
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/shared/waiter.rs:66:17                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
66   |                 next.as_ref().prev.set(Some(current));                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^                                                                                                                                                                                                                            
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:576:55: 576:58}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |           let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                        
     |  ____________________^                                                                                                                                                                                                                                   
59   | |             let mut current = head;                                                                                                                                                                                                                    
60   | |             loop {                                                                                                                                                                                                                                     
61   | |                 // Scan through the link following the `next` fields to find the tail of the queue.                                                                                                                                                    
...    |                                                                                                                                                                                                                                                        
77   | |             }                                                                                                                                                                                                                                          
78   | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:576:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
576  |             let _ = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                           
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                            
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/rwlock.rs:477:33                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
477  |                     if unsafe { self.try_queue(&mut state, waiter.as_ref()) } {                                                                                                                                                                          
     |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                              
note: inside `shared::waiter::Waiter::with::<(), {closure@src/rwlock.rs:449:22: 449:30}>`                                                                                                                                                                       
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `rwlock::RawRwLock::lock_common::<{closure@src/rwlock.rs:427:24: 427:60}>`                                                                                                                                                                         
    --> src/rwlock.rs:449:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
449  | /         Waiter::with(|waiter| {                                                                                                                                                                                                                        
450  | |             waiter.waiting_on.set(Some(NonNull::from(self).cast()));                                                                                                                                                                                   
451  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
482  | |             }                                                                                                                                                                                                                                          
483  | |         });                                                                                                                                                                                                                                            
     | |__________^                                                                                                                                                                                                                                             
note: inside `rwlock::RawRwLock::lock_exclusive_slow`                                                                                                                                                                                                           
    --> src/rwlock.rs:434:9                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
434  |         self.lock_common(is_writer, try_lock)                                                                                                                                                                                                            
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                            
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::lock_exclusive`                                                                                                                                                                                       
    --> src/rwlock.rs:93:13                                                                                                                                                                                                                                     
     |                                                                                                                                                                                                                                                          
93   |             self.lock_exclusive_slow();                                                                                                                                                                                                                  
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `<mutex::RawMutex as lock_api::RawMutex>::lock`                                                                                                                                                                                                    
    --> src/mutex.rs:32:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
32   |         self.rwlock.lock_exclusive()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
     = note: inside `lock_api::Mutex::<mutex::RawMutex, condvar::webkit_queue_test::Queue>::lock` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:223:9: 223:24                                                      
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1019:33                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1019 |                 let mut queue = input_queue.lock();                                                                                                                                                                                                      
     |                                 ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   4.228s] usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_all                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_all ---                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_all ---                                                                                                                                             
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_all`                                                                                                                                                                 
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-11`:                                                                                                                                                                                                                  
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
     = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                          
     = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
     = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1031:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1031 |                 std::mem::drop(queue);                                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x3597f0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x3597f0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-12`:                                                                                                                                                                                                                  
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
     = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                          
     = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
     = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1063:21                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1063 |                     std::mem::drop(queue);                                                                                                                                                                                                               
     |                     ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   4.454s] usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_one                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_one ---                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_one ---                                                                                                                                             
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_one`                                                                                                                                                                 
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-5`:                                                                                                                                                                                                                   
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
     = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                          
     = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
     = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1031:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1031 |                 std::mem::drop(queue);                                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x38d0b0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x38d0b0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-11`:                                                                                                                                                                                                                  
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
     = note: inside `<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue> as std::ops::Drop>::drop` at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.12/src/mutex.rs:671:13: 671:36                          
     = note: inside `std::ptr::drop_in_place::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>> - shim(Some(lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>))` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:542:1: 542:56
     = note: inside `std::mem::drop::<lock_api::MutexGuard<'_, mutex::RawMutex, condvar::webkit_queue_test::Queue>>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:938:24: 938:25               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1031:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1031 |                 std::mem::drop(queue);                                                                                                                                                                                                                   
     |                 ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        FAIL [   3.390s] usync condvar::webkit_queue_test::ten_producers_ten_consumers_one_slot                                                                                                                                                                 
                                                                                                                                                                                                                                                                
--- STDOUT:              usync condvar::webkit_queue_test::ten_producers_ten_consumers_one_slot ---                                                                                                                                                             
                                                                                                                                                                                                                                                                
running 1 test                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                
--- STDERR:              usync condvar::webkit_queue_test::ten_producers_ten_consumers_one_slot ---                                                                                                                                                             
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:11:5                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
11   |     addr as *mut T                                                                                                                                                                                                                                       
     |     ^^^^^^^^^^^^^^ integer-to-pointer cast                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
     = help: This program is using integer-to-pointer casts or (equivalently) `ptr::with_exposed_provenance`,                                                                                                                                                   
     = help: which means that Miri might miss pointer bugs in this program.                                                                                                                                                                                     
     = help: See https://doc.rust-lang.org/nightly/std/ptr/fn.with_exposed_provenance.html for more details on that operation.                                                                                                                                  
     = help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.                                                
     = help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `with_exposed_provenance` semantics.                                                                                                               
     = help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.                                                                                                                                                                      
     = note: BACKTRACE on thread `condvar::webkit`:                                                                                                                                                                                                             
     = note: inside `shared::strict_provenance::invalid_mut::<shared::waiter::Waiter>` at src/shared/strict_provenance.rs:11:5: 11:19                                                                                                                           
note: inside `condvar::Condvar::new`                                                                                                                                                                                                                            
    --> src/condvar.rs:115:35                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
115  |             state: AtomicPtr::new(invalid_mut(EMPTY)),                                                                                                                                                                                                   
     |                                   ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                     
note: inside `condvar::webkit_queue_test::run_queue_test`                                                                                                                                                                                                       
    --> src/condvar.rs:950:40                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
950  |         let empty_condition = Arc::new(Condvar::new());                                                                                                                                                                                                  
     |                                        ^^^^^^^^^^^^^^                                                                                                                                                                                                    
note: inside `condvar::webkit_queue_test::ten_producers_ten_consumers_one_slot`                                                                                                                                                                                 
    --> src/condvar.rs:1084:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1084 | /                 run_queue_test(                                                                                                                                                                                                                        
1085 | |                     $num_producers,                                                                                                                                                                                                                    
1086 | |                     $num_consumers,                                                                                                                                                                                                                    
1087 | |                     $max_queue_size,                                                                                                                                                                                                                   
...    |                                                                                                                                                                                                                                                        
1091 | |                     delay,                                                                                                                                                                                                                             
1092 | |                     );                                                                                                                                                                                                                                 
     | |_____________________^                                                                                                                                                                                                                                  
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1082:23                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1082 |               fn $name() {                                                                                                                                                                                                                               
     |                         ^                                                                                                                                                                                                                                
...                                                                                                                                                                                                                                                             
1097 | /     run_queue_tests! {                                                                                                                                                                                                                                 
1098 | |         sanity_check_queue(                                                                                                                                                                                                                            
1099 | |             num_producers: 1,                                                                                                                                                                                                                          
1100 | |             num_consumers: 1,                                                                                                                                                                                                                          
...    |                                                                                                                                                                                                                                                        
1232 | |         );                                                                                                                                                                                                                                             
1233 | |     }                                                                                                                                                                                                                                                  
     | |_____- in this macro invocation                                                                                                                                                                                                                         
     = note: this warning originates in the macro `run_queue_tests` (in Nightly builds, run with -Z macro-backtrace for more info)                                                                                                                              
                                                                                                                                                                                                                                                                
warning: integer-to-pointer cast                                                                                                                                                                                                                                
    --> src/shared/strict_provenance.rs:65:13                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
65   | /             NonNull::from(self)                                                                                                                                                                                                                        
66   | |                 .cast::<AtomicUsize>()                                                                                                                                                                                                                 
67   | |                 .as_ref()                                                                                                                                                                                                                              
68   | |                 .fetch_sub(value.address(), ordering) as *mut T                                                                                                                                                                                        
     | |_______________________________________________________________^ integer-to-pointer cast                                                                                                                                                                
     |                                                                                                                                                                                                                                                          
     = note: BACKTRACE on thread `unnamed-13`:                                                                                                                                                                                                                  
     = note: inside `<std::sync::atomic::AtomicPtr<shared::waiter::Waiter> as shared::strict_provenance::AtomicPtrRmw<*mut shared::waiter::Waiter>>::fetch_sub` at src/shared/strict_provenance.rs:65:13: 68:64                                                 
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:631:21                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
631  | /                     self.state                                                                                                                                                                                                                         
632  | |                         .fetch_sub(state.with_address(QUEUE_LOCKED), Ordering::Release);                                                                                                                                                               
     | |_______________________________________________________________________________________^                                                                                                                                                                
note: inside `rwlock::RawRwLock::link_queue_or_unpark`                                                                                                                                                                                                          
    --> src/rwlock.rs:570:24                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
570  |                 return self.unpark(state);                                                                                                                                                                                                               
     |                        ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                
note: inside `rwlock::RawRwLock::try_queue`                                                                                                                                                                                                                     
    --> src/rwlock.rs:553:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
553  |             self.link_queue_or_unpark(new_state);                                                                                                                                                                                                        
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::try_requeue`                                                                                                                                                                                                                   
    --> src/rwlock.rs:502:16                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
502  |             if self.try_queue(&mut state, waiter.as_ref()) {                                                                                                                                                                                             
     |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                               
note: inside `condvar::Condvar::unpark_requeue`                                                                                                                                                                                                                 
    --> src/condvar.rs:572:17                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
572  |             if !raw_rwlock.as_ref().try_requeue(waiter) {                                                                                                                                                                                                
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                  
note: inside `condvar::Condvar::unpark_waiters`                                                                                                                                                                                                                 
    --> src/condvar.rs:552:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
552  |         self.unpark_requeue(head)                                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                        
note: inside `condvar::Condvar::notify_all_slow`                                                                                                                                                                                                                
    --> src/condvar.rs:423:26                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
423  |                 unsafe { self.unpark_waiters(state) };                                                                                                                                                                                                   
     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                      
note: inside `condvar::Condvar::notify_all`                                                                                                                                                                                                                     
    --> src/condvar.rs:400:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
400  |         self.notify_all_slow(state)                                                                                                                                                                                                                      
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                      
note: inside `condvar::webkit_queue_test::notify`                                                                                                                                                                                                               
    --> src/condvar.rs:934:21                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
934  |                     condition.notify_all();                                                                                                                                                                                                              
     |                     ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                               
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1066:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1066 |                 notify(notify_style, &*empty_condition, should_notify);                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
error: Undefined Behavior: out-of-bounds pointer use: 0x2b29b0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                                            
    --> /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18                                                                                                                                  
     |                                                                                                                                                                                                                                                          
402  |         unsafe { &*self.as_ptr().cast_const() }                                                                                                                                                                                                          
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: 0x2b29b0[noalloc] is a dangling pointer (it has no provenance)                                                                                                                  
     |                                                                                                                                                                                                                                                          
     = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior                                                                                                                                              
     = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information                                                                                                                                         
     = note: BACKTRACE on thread `unnamed-9`:                                                                                                                                                                                                                   
     = note: inside `std::ptr::NonNull::<shared::waiter::Waiter>::as_ref::<'_>` at /root/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:402:18: 402:46                                               
note: inside `shared::waiter::Waiter::get_and_link_queue::<{closure@src/rwlock.rs:619:66: 619:69}>`                                                                                                                                                             
    --> src/shared/waiter.rs:58:20                                                                                                                                                                                                                              
     |                                                                                                                                                                                                                                                          
58   |         let tail = head.as_ref().tail.get().unwrap_or_else(|| {                                                                                                                                                                                          
     |                    ^^^^^^^^^^^^^                                                                                                                                                                                                                         
note: inside `rwlock::RawRwLock::unpark`                                                                                                                                                                                                                        
    --> src/rwlock.rs:619:32                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
619  |             let (head, tail) = Waiter::get_and_link_queue(state, |_| {});                                                                                                                                                                                
     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                 
note: inside `rwlock::RawRwLock::unlock_and_unpark`                                                                                                                                                                                                             
    --> src/rwlock.rs:293:17                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
293  |                 self.unpark(new_state);                                                                                                                                                                                                                  
     |                 ^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside `rwlock::RawRwLock::unlock_exclusive_fast`                                                                                                                                                                                                         
    --> src/rwlock.rs:259:13                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
259  |             self.unlock_and_unpark();                                                                                                                                                                                                                    
     |             ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<rwlock::RawRwLock as lock_api::RawRwLock>::unlock_exclusive`                                                                                                                                                                                     
    --> src/rwlock.rs:99:9                                                                                                                                                                                                                                      
     |                                                                                                                                                                                                                                                          
99   |         self.unlock_exclusive_fast()                                                                                                                                                                                                                     
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                     
note: inside `<mutex::RawMutex as lock_api::RawMutex>::unlock`                                                                                                                                                                                                  
    --> src/mutex.rs:42:9                                                                                                                                                                                                                                       
     |                                                                                                                                                                                                                                                          
42   |         self.rwlock.unlock_exclusive()                                                                                                                                                                                                                   
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                   
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:249:13                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
249  |             raw_mutex.unlock();                                                                                                                                                                                                                          
     |             ^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                                           
note: inside `shared::waiter::Waiter::with::<condvar::WaitTimeoutResult, {closure@src/condvar.rs:193:22: 193:30}>`                                                                                                                                              
    --> src/shared/waiter.rs:47:9                                                                                                                                                                                                                               
     |                                                                                                                                                                                                                                                          
47   |         f(unsafe { Pin::new_unchecked(&waiter) })                                                                                                                                                                                                        
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                        
note: inside `condvar::Condvar::wait_with::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                 
    --> src/condvar.rs:193:9                                                                                                                                                                                                                                    
     |                                                                                                                                                                                                                                                          
193  | /         Waiter::with(|waiter| unsafe {                                                                                                                                                                                                                 
194  | |             // MutexGuard acquired the internal RawRwLock as a writer                                                                                                                                                                                  
195  | |             let is_writer = true;                                                                                                                                                                                                                      
196  | |             waiter.flags.set(is_writer as usize);                                                                                                                                                                                                      
...    |                                                                                                                                                                                                                                                        
271  | |             WaitTimeoutResult(timed_out)                                                                                                                                                                                                               
272  | |         })                                                                                                                                                                                                                                             
     | |__________^                                                                                                                                                                                                                                             
note: inside `condvar::Condvar::wait::<condvar::webkit_queue_test::Queue>`                                                                                                                                                                                      
    --> src/condvar.rs:128:22                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
128  |         let result = self.wait_with(mutex_guard, None);                                                                                                                                                                                                  
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                   
note: inside `condvar::webkit_queue_test::wait::<condvar::webkit_queue_test::Queue, {closure@src/condvar.rs:1023:21: 1023:36}>`                                                                                                                                 
    --> src/condvar.rs:919:37                                                                                                                                                                                                                                   
     |                                                                                                                                                                                                                                                          
919  |                 Timeout::Forever => condition.wait(lock),                                                                                                                                                                                                
     |                                     ^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                                 
note: inside closure                                                                                                                                                                                                                                            
    --> src/condvar.rs:1020:17                                                                                                                                                                                                                                  
     |                                                                                                                                                                                                                                                          
1020 | /                 wait(                                                                                                                                                                                                                                  
1021 | |                     &*empty_condition,                                                                                                                                                                                                                 
1022 | |                     &mut queue,                                                                                                                                                                                                                        
1023 | |                     |state| -> bool { !state.items.is_empty() || !state.should_continue },                                                                                                                                                             
1024 | |                     &timeout,                                                                                                                                                                                                                          
1025 | |                 );                                                                                                                                                                                                                                     
     | |_________________^                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace                                                                                                                                                              
                                                                                                                                                                                                                                                                
error: aborting due to 1 previous error; 5 warnings emitted                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                
        PASS [  15.461s] usync mutex::tests::lots_and_lots                                                                                                                                                                                                      
        PASS [   2.734s] usync mutex::tests::smoke                                                                                                                                                                                                              
        PASS [   2.762s] usync mutex::tests::test_get_mut                                                                                                                                                                                                       
        PASS [   2.821s] usync mutex::tests::test_into_inner                                                                                                                                                                                                    
        PASS [   2.709s] usync mutex::tests::test_into_inner_drop                                                                                                                                                                                               
        PASS [   4.713s] usync mutex::tests::test_mutex_arc_access_in_unwind                                                                                                                                                                                    
        PASS [   2.655s] usync mutex::tests::test_mutex_arc_condvar                                                                                                                                                                                             
        PASS [   2.745s] usync mutex::tests::test_mutex_arc_nested                                                                                                                                                                                              
        PASS [   2.588s] usync mutex::tests::test_mutex_debug                                                                                                                                                                                                   
        PASS [   2.534s] usync mutex::tests::test_mutex_unsized                                                                                                                                                                                                 
        PASS [   2.728s] usync mutex::tests::test_mutexguard_sync                                                                                                                                                                                               
        PASS [   2.641s] usync mutex::tests::try_lock                                                                                                                                                                                                           
        PASS [   9.829s] usync once::tests::poison_bad                                                                                                                                                                                                          
        PASS [   4.072s] usync once::tests::smoke_once                                                                                                                                                                                                          
        PASS [   3.301s] usync once::tests::stampede_once                                                                                                                                                                                                       
        PASS [   2.505s] usync once::tests::test_once_debug                                                                                                                                                                                                     
        PASS [   6.966s] usync once::tests::wait_for_force_to_finish                                                                                                                                                                                            
        PASS [   2.956s] usync reentrant_mutex::tests::is_mutex                                                                                                                                                                                                 
        PASS [   2.526s] usync reentrant_mutex::tests::smoke                                                                                                                                                                                                    
        PASS [   2.583s] usync reentrant_mutex::tests::test_reentrant_mutex_debug                                                                                                                                                                               
        PASS [   2.515s] usync reentrant_mutex::tests::trylock_works                                                                                                                                                                                            
        PASS [  43.610s] usync rwlock::tests::frob                                                                                                                                                                                                              
        PASS [   2.654s] usync rwlock::tests::smoke                                                                                                                                                                                                             
        PASS [   2.538s] usync rwlock::tests::test_clone                                                                                                                                                                                                        
        PASS [   2.580s] usync rwlock::tests::test_get_mut                                                                                                                                                                                                      
        PASS [   2.434s] usync rwlock::tests::test_into_inner                                                                                                                                                                                                   
        PASS [   2.711s] usync rwlock::tests::test_into_inner_drop                                                                                                                                                                                              
        PASS [   2.726s] usync rwlock::tests::test_parking_lot_issue_203                                                                                                                                                                                        
        PASS [   2.841s] usync rwlock::tests::test_rw_arc                                                                                                                                                                                                       
        PASS [   4.569s] usync rwlock::tests::test_rw_arc_access_in_unwind                                                                                                                                                                                      
        PASS [   4.676s] usync rwlock::tests::test_rw_arc_no_poison_rr                                                                                                                                                                                          
        PASS [   4.746s] usync rwlock::tests::test_rw_arc_no_poison_rw                                                                                                                                                                                          
        PASS [   4.307s] usync rwlock::tests::test_rw_arc_no_poison_wr                                                                                                                                                                                          
        PASS [   5.295s] usync rwlock::tests::test_rw_arc_no_poison_ww                                                                                                                                                                                          
        PASS [   2.765s] usync rwlock::tests::test_rw_write_is_locked                                                                                                                                                                                           
        PASS [   2.485s] usync rwlock::tests::test_rwlock_debug                                                                                                                                                                                                 
        PASS [   2.747s] usync rwlock::tests::test_rwlock_try_read                                                                                                                                                                                              
        PASS [   2.906s] usync rwlock::tests::test_rwlock_try_write                                                                                                                                                                                             
        PASS [   2.775s] usync rwlock::tests::test_rwlock_unsized                                                                                                                                                                                               
        PASS [   2.737s] usync rwlock::tests::test_rwlockguard_sync                                                                                                                                                                                             
------------                                                                                                                                                                                                                                                    
     Summary [ 300.569s] 68 tests run: 54 passed, 14 failed, 0 skipped                                                                                                                                                                                          
        FAIL [   4.237s] usync condvar::tests::notify_all                                                                                                                                                                                                       
        FAIL [   3.943s] usync condvar::tests::notify_all_return                                                                                                                                                                                                
        FAIL [   3.561s] usync condvar::tests::test_parking_lot_issue_129                                                                                                                                                                                       
        FAIL [   3.091s] usync condvar::tests::two_mutexes                                                                                                                                                                                                      
        FAIL [   3.031s] usync condvar::webkit_queue_test::new_test_without_timeout_5                                                                                                                                                                           
        FAIL [   3.461s] usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_all                                                                                                                                                  
        FAIL [   3.571s] usync condvar::webkit_queue_test::one_producer_ten_consumers_hundred_slots_notify_one                                                                                                                                                  
        FAIL [   3.455s] usync condvar::webkit_queue_test::one_producer_ten_consumers_one_slot                                                                                                                                                                  
        FAIL [   4.264s] usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_all                                                                                                                                                  
        FAIL [   5.297s] usync condvar::webkit_queue_test::ten_producers_one_consumer_hundred_slots_notify_one                                                                                                                                                  
        FAIL [   2.973s] usync condvar::webkit_queue_test::ten_producers_one_consumer_one_slot                                                                                                                                                                  
        FAIL [   4.228s] usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_all                                                                                                                                                 
        FAIL [   4.454s] usync condvar::webkit_queue_test::ten_producers_ten_consumers_hundred_slots_notify_one                                                                                                                                                 
        FAIL [   3.390s] usync condvar::webkit_queue_test::ten_producers_ten_consumers_one_slot                                                                                                                                                                 
error: test run failed                                                                                                                                                                                                                                          
warning: method `fetch_add` is never used                                                                                                                                                                                                                       
  --> src/shared/strict_provenance.rs:48:8                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
47 | pub(crate) trait AtomicPtrRmw<T> {                                                                                                                                                                                                                         
   |                  ------------ method in this trait                                                                                                                                                                                                         
48 |     fn fetch_add(&self, value: T, ordering: Ordering) -> T;                                                                                                                                                                                                
   |        ^^^^^^^^^                                                                                                                                                                                                                                           
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dead_code)]` on by default                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing                                                                                                                                                                             
  --> src/shared/event.rs:69:9                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
69 |         drop(self);                                                                                                                                                                                                                                        
   |         ^^^^^----^                                                                                                                                                                                                                                         
   |              |                                                                                                                                                                                                                                             
   |              argument has type `std::pin::Pin<&shared::event::Event>`                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_copy_types)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
69 -         drop(self);                                                                                                                                                                                                                                        
69 +         let _ = self;                                                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing                                                                                                                                                                      
  --> src/shared/parker.rs:91:13                                                                                                                                                                                                                                
   |                                                                                                                                                                                                                                                            
91 |             drop(self);                                                                                                                                                                                                                                    
   |             ^^^^^----^                                                                                                                                                                                                                                     
   |                  |                                                                                                                                                                                                                                         
   |                  argument has type `&shared::parker::Parker`                                                                                                                                                                                               
   |                                                                                                                                                                                                                                                            
   = note: `#[warn(dropping_references)]` on by default                                                                                                                                                                                                         
help: use `let _ = ...` to ignore the expression or result                                                                                                                                                                                                      
   |                                                                                                                                                                                                                                                            
91 -             drop(self);                                                                                                                                                                                                                                    
91 +             let _ = self;                                                                                                                                                                                                                                  
   |                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                
warning: `usync` (lib) generated 3 warnings                                                                                                                                                                                                                     
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.02s                                                                                                                                                                                        
   Doc-tests usync                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                
running 11 tests                                                                                                                                                                                                                                                
test src/barrier.rs - barrier::Barrier (line 18) ... ok                                                                                                                                                                                                         
test src/barrier.rs - barrier::Barrier::new (line 82) ... ok                                                                                                                                                                                                    
test src/barrier.rs - barrier::Barrier::wait (line 107) ... ok                                                                                                                                                                                                  
test src/barrier.rs - barrier::BarrierWaitResult (line 305) ... ok                                                                                                                                                                                              
test src/barrier.rs - barrier::BarrierWaitResult::is_leader (line 330) ... ok                                                                                                                                                                                   
test src/condvar.rs - condvar::Condvar (line 47) ... ok                                                                                                                                                                                                         
test src/condvar.rs - condvar::Condvar::notify_one (line 318) ... ok                                                                                                                                                                                            
test src/mutex.rs - mutex::Mutex (line 80) ... ok                                                                                                                                                                                                               
test src/once.rs - once::Once (line 28) ... ok                                                                                                                                                                                                                  
test src/once.rs - once::Once::call_once (line 105) ... ok                                                                                                                                                                                                      
test src/rwlock.rs - rwlock::RwLock (line 735) ... ok                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.40s