-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libheaptrace: Fix initialized from TLS to global
The current implementation checks 'initialized' as a TLS variable, but it's actually incorrect because heaptrace_init() is invoked only once for each process, not for each thread. More precisely, it's invoked when exec() invoked to replace its address map. Due to this bug, thread allocations are missed and thread deallocations are also missed so it keeps memory allocation status if the target backtrace is allocated by a different thread. This patch makes 'initialized' variable from TLS to global static. Signed-off-by: Honggyu Kim <[email protected]>
- Loading branch information
1 parent
e443599
commit 18c2b05
Showing
2 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters