mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-18 00:21:41 +03:00
Initialize all members of non-TLS tsd wrapper when creating it
Not setting the initialized member leads to randomly calling the cleanup function in cases it shouldn't be called (and isn't called in other implementations).
This commit is contained in:
parent
86e58583bb
commit
7ff1ce4131
1 changed files with 1 additions and 0 deletions
|
|
@ -253,6 +253,7 @@ a_name##_tsd_get_wrapper(void) \
|
|||
} else { \
|
||||
static a_type tsd_static_data = a_initializer; \
|
||||
wrapper->isstatic = false; \
|
||||
wrapper->initialized = false; \
|
||||
wrapper->val = tsd_static_data; \
|
||||
} \
|
||||
if (pthread_setspecific(a_name##_tsd, \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue