Files
blis/frame/thread
Varaganti, Kiran 9230c978a1 Fixed Data Race in Native code-path (#251)
```c
_Pragma( "omp parallel num_threads(n_threads)" )
{
    // ... thread work ...

    // Free the current thread's thrinfo_t structure.
    bli_l3_thrinfo_free( rntm_p, thread );  // Line 183
}
// *** MISSING BARRIER HERE! ***

// Check the array_t back into the small block allocator...
bli_sba_checkin_array( array );  // Line 200
```

```c
// DANGEROUS execution timeline:
Thread 0 (chief):
    completes func()
    calls bli_l3_cntl_free()
    calls bli_l3_thrinfo_free() → frees gl_comm ✓
    exits OpenMP parallel region
    calls bli_sba_checkin_array(array) → frees array ✗

Thread 1,2,3 (still executing):
    still in func() or bli_l3_cntl_free()
    trying to access freed gl_comm → CRASH!
    trying to access freed array pools → CRASH!
```

This is **exactly the same issue** that PR #702 fixed in other files! The function needs a barrier before threads exit the parallel region to ensure:

1. **All threads complete their work** before any cleanup starts
2. **Global communicator isn't freed** while other threads are using it
3. **Array pools aren't freed** while other threads are accessing them
2025-11-07 10:49:19 +05:30
..
2023-11-23 08:54:31 -05:00
2025-06-17 10:40:10 +01:00
2025-06-17 10:40:10 +01:00