diff options
| author | Javier Blazquez <[email protected]> | 2022-09-10 13:09:45 -0700 |
|---|---|---|
| committer | Jack O'Connor <[email protected]> | 2023-07-21 19:18:40 -0700 |
| commit | 12823b87604cbb7bcd0e5cdc347a53f80b2a617c (patch) | |
| tree | 5f8dd3544d035ad3ffe769170b792c3846edb650 /Cargo.toml | |
| parent | e302cdf36f1a8f3b9833b151c6c57964053cd587 (diff) | |
blake3_dispatch: Fix race condition initializing g_cpu_features.
If multiple threads try to compute a hash simultaneously before the library has been used for the first time,
the logic in get_cpu_features that detects CPU features will write to g_cpu_features without synchronization,
which is a race condition and flagged by ThreadSanitizer.
This change marks g_cpu_features as an atomic variable to address the race condition.
Diffstat (limited to 'Cargo.toml')
0 files changed, 0 insertions, 0 deletions
