Skip to content

Conversation

var-const
Copy link
Contributor

Thread sanitizer spots a data race in GULSetLoggerLevel (full error message here). This prevents a clean run of Firestore integration tests under TSan.

Following #1390, I'm simply making sanitizer ignore this function. However, note that in both C++ and C, a data race is undefined behavior (the compiler is free to produce code assuming the memory in question is never accessed from more than one thread). I don't know if Objective-C provides any stronger guarantees.

@wilhuff
Copy link
Contributor

wilhuff commented Oct 16, 2018

Objective-C does not provide any stronger guarantee. While this is undefined behavior, on the platforms we support this does have predictable behavior, even if that behavior results in uncertainty about the value for some length of time (basically until the next memory barrier).

@var-const
Copy link
Contributor Author

@wilhuff Thanks for the clarification!

@var-const var-const merged commit 1eed3ee into master Oct 17, 2018
@paulb777 paulb777 deleted the varconst/gul-logger-ignore-race branch April 13, 2019 16:01
@firebase firebase locked and limited conversation to collaborators Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants