We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ee68f5 commit 755ae96Copy full SHA for 755ae96
src/data_race.rs
@@ -679,14 +679,12 @@ impl VClockAlloc {
679
680
/// Create a new data-race detector for newly allocated memory.
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{
+ let (alloc_timestamp, alloc_index) = if track_alloc {
687
let (alloc_index, clocks) = global.current_thread_state();
688
let alloc_timestamp = clocks.clock[alloc_index];
689
(alloc_timestamp, alloc_index)
+ }else{
+ (0, VectorIdx::MAX_INDEX)
690
};
691
VClockAlloc {
692
global: Rc::clone(global),
0 commit comments