HomePhabricator

Reimplement Thread Static Data ASan routines with TLS

Authored by krytarowski on Dec 19 2018, 3:11 AM.

Description

Reimplement Thread Static Data ASan routines with TLS

Summary:
Thread Static Data cannot be used in early init on NetBSD
and FreeBSD. Reuse the ASan TSD API for compatibility with
existing code with an alternative implementation using Thread
Local Storage.

New version uses Thread Local Storage to store a pointer
with thread specific data. The destructor from TSD has been
replaced with a TLS destrucutor that is called upon thread
exit.

Reviewers: joerg, vitalybuka, jfb

Reviewed By: vitalybuka

Subscribers: dim, emaste, ro, jfb, devnexen, kubamracek, mgorny, llvm-commits, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D55596

llvm-svn: 349619

Details

Committed
krytarowskiDec 19 2018, 3:11 AM
Reviewer
vitalybuka
Differential Revision
D55596: Reimplement Thread Static Data ASan routines with TLS
Parents
rGdd67793c0c54: [clangd] Unify path canonicalizations in the codebase
Branches
Unknown
Tags
Unknown