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
…ont (#44849)
### Rationale for this change
The `UnsyncFront` method claims that it can access a `std::deque`'s front element without synchronizing with another thread that would call `std::deque::push_back`, but `std::deque::front` can actually be implemented in terms of `std::deque::begin` while `std::deque::push_back` is specified to invalidate iterators.
In the end, `UnsyncFront` is concretely thread-unsafe even though it might ideally be thread-safe. This shows up as occasional Thread Sanitizer failures.
### What changes are included in this PR?
Replace `UnsyncFront` with a thread-safe `Front` method.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #44846
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Describe the bug, including details regarding any error messages, version, and platform.
The failure started since these commits were merged: 27bbd59...0cdbdac
They seem harmless to me.
The failure:
See parts of the failure log here:
Component(s)
C++, Continuous Integration
The text was updated successfully, but these errors were encountered: