Work around MemorySanitizer false-positive
Work around MemorySanitizer false-positive

The initialization of static thread-local data is not observed by
MemorySanitizer when inside a shared library, leading to false-positive
use-of-uninitialized-data errors:
https://github.com/google/sanitizers/issues/1409

We work around this by assigning an initial value to it ourselves on
first use. Note that since the flag to check whether this
initialization has already been done is itself a static thread-local,
we must suppress the MemorySanitizer check with a function attribute.

Bug: b/191050320
Change-Id: I356a89f90ff099e08a12f5562e0545ed14d93ee3
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/55328
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
Kokoro-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Corentin Wallez <470c533e86f4f848c98c7e11fffc2d043494a401@google.com>

google/swiftshader,google/swiftshader,google/swiftshader