You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: data race between libddwaf.Load() and libddwaf.Usable() (#149)
A data race existed between `libddwaf.Load()` and `libddwaf.Usable()` as
both access shared global state that is not managed through atomic
pointers.
This PR adds a `sync.Mutex` to resolve the race condition between `Load`
and `Usable`; as the use of a `sync.Once` in `Load` ensures there is no
race condition in other places (all uses of the `gWafLib` are guaranteed
to be preceded by a call to `Load`, which means the reads "synchronize
after" the write).
0 commit comments