File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -679,14 +679,12 @@ impl VClockAlloc {
679
679
680
680
/// Create a new data-race detector for newly allocated memory.
681
681
pub fn new_allocation ( global : & MemoryExtra , len : Size , track_alloc : bool ) -> VClockAlloc {
682
- //FIXME: stack allocations are currently ignored due to the lazy nature of stack
683
- // allocation, this results in data-races being missed.
684
- let ( alloc_timestamp, alloc_index) = if !track_alloc {
685
- ( 0 , VectorIdx :: MAX_INDEX )
686
- } else {
682
+ let ( alloc_timestamp, alloc_index) = if track_alloc {
687
683
let ( alloc_index, clocks) = global. current_thread_state ( ) ;
688
684
let alloc_timestamp = clocks. clock [ alloc_index] ;
689
685
( alloc_timestamp, alloc_index)
686
+ } else {
687
+ ( 0 , VectorIdx :: MAX_INDEX )
690
688
} ;
691
689
VClockAlloc {
692
690
global : Rc :: clone ( global) ,
You can’t perform that action at this time.
0 commit comments