sigchain: switch from __thread to pthread_setspecific.
__thread is implemented via emutls on Android, which will result in the thread local variable being allocated again and leaked if it gets used after it has been destructed already (e.g. by a later destructor calling sigprocmask, or triggering a signal handler). Switch to pthread_setspecific, which doesn't suffer from this problem. Bug: http://b/36871013 Test: ran dalvikvm on a class that spins creating threads Change-Id: Ie5deab453be387490ba30a0010e12f60d736c8ad (cherry picked from commit 99875e9e)
Loading
Please sign in to comment