• Mike Percy's avatar
    Use thread local for libunwind GetStackTrace() · f581614a
    Mike Percy authored
    Previously, the implementation of google::GetStackTrace() that uses
    libunwind uses a global variable that enforces that only one thread may
    invoke libunwind at a time. However, libunwind is thread-safe. The
    comment above the variable indicates that it is to protect against
    reentrancy issues.
    
    Instead of using a global variable, it would be much better to use a
    thread-local variable to protect against these reentrancy issues. That
    should provide the needed reentrancy protection while allowing multiple
    threads to get stack traces at the same time.
    
    It also allows for the removal of the atomic CAS operations on the
    variable.
    
    Resolves #160.
    f581614a
Name
Last commit
Last update
cmake Loading commit data...
doc Loading commit data...
m4 Loading commit data...
packages Loading commit data...
src Loading commit data...
vsprojects Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
Makefile.in Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.windows Loading commit data...
aclocal.m4 Loading commit data...
compile Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
depcomp Loading commit data...
glog-config.cmake.in Loading commit data...
google-glog.sln Loading commit data...
install-sh Loading commit data...
libglog.pc.in Loading commit data...
ltmain.sh Loading commit data...
missing Loading commit data...
mkinstalldirs Loading commit data...
test-driver Loading commit data...