summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Main.java
diff options
context:
space:
mode:
authorDave Allison <dallison@google.com>2014-09-16 10:01:01 -0700
committerBrian Carlstrom <bdc@google.com>2014-10-10 05:06:10 +0000
commita4fee49a5023a3cf8431597950ee87c711d0b81c (patch)
tree27115b6876dc4f319ca938335708e136a378d5d8 /test/ProfileTestMultiDex/Main.java
parentb90132cb5132eaeb4dbfca1e63d79b4005dacec5 (diff)
Don't call dlsym from signal context in signal chain
It is dangerous to call dlsym from within a signal context since it takes a lock and can lead to a mutex reentry attempt if timing is bad. This change adds an initialization function to the signal chain that calls dlsym for sigaction and sigprocmask from outside the signal context (from Runtime::Init()). The results are cached in a static variable and used from within the signal context if necessary. However, tests don't necessarily call Runtime::Init() so we also need to deal with the case where the signal chain is not initialized and perform a lazy initialization from inside sigaction or sigprocmask. This is always outside a signal context since we have not initialized the runtime. Bug: 17498571, 17896006 (cherry picked from commit cefcea838729287a04174664a76514dd793dd77d) Change-Id: I9bf8540a1250eadf977ff9af249dbe1c73b5ac63
Diffstat (limited to 'test/ProfileTestMultiDex/Main.java')
0 files changed, 0 insertions, 0 deletions