Tags: algolia/ddprof
Tags
Crash fix in case of forks: use static TLS for alloc tracking storage (… …DataDog#490) * Remove pthread_key and use initial-exec TLS instead * Replace heap-allocated void* TLS with a char[] buffer using initial-exec __thread and placement new. - Add `initialized` field to TrackerThreadLocalState - Shared C header (tls_state_storage.h) for size/alignment constants between loader.c and C++ code, with static_assert - Clean up dead code: _key_once, _tl_state_key, delete_tl_state - Add standalone fork test validating TLS zero-init, fork inheritance, and fresh-thread behavior --------- Co-authored-by: Nicolas Savoire <nicolas.savoire@datadoghq.com>
PreviousNext