Skip to content

Tags: algolia/ddprof

Tags

latest-rc

Toggle latest-rc's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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>

Verified

This tag was signed with the committer’s verified signature.

Verified

This tag was signed with the committer’s verified signature.

Verified

This tag was signed with the committer’s verified signature.
nsavoire Nicolas Savoire

Verified

This tag was signed with the committer’s verified signature.

Verified

This tag was signed with the committer’s verified signature.

Verified

This tag was signed with the committer’s verified signature.

Verified

This tag was signed with the committer’s verified signature.
nsavoire Nicolas Savoire

Verified

This tag was signed with the committer’s verified signature.

Verified

This tag was signed with the committer’s verified signature.