hashmap: avoid using TLS in a destructor
Using C11 thread-local storage in destructors causes uninitialized read. Let's avoid that using a direct comparison instead of using the cached values. As this code path is taken only when compiled with -DVALGRIND=1, the performance cost shouldn't matter too much. Fixes #12814 (cherry picked from commit 31c9d74d)
Loading