diff options
author | Josh Gao <jmgao@google.com> | 2017-04-26 19:09:47 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-05-12 12:37:40 -0700 |
commit | fd4d0d3eb9b5c7fe2fa1df97d9c0763900b2be52 (patch) | |
tree | 25c774814eb3b6e595ea9c267fcb93fee03bf3eb /compiler/optimizing/graph_visualizer.cc | |
parent | bc9a87c33a3f1553934872387a0bb3178b5140e8 (diff) |
sigchain: always call InitializeSignalChain on startup.
Processes that link against libsigchain because they might want to
dynamically load libart.so (e.g. surfaceflinger) might never explicitly
call InitializeSignalChain. In this scenario, the lazy initialization
that occurs when sigprocmask is called can happen at unexpected times,
such as from pthread_exit, leading to deadlocks or crashes.
Add __attribute__((constructor)) to InitializeSignalChain to have it be
automatically called upon process start. Keep the existing calls to it
in the wrapper functions in order to sidestep problems around static
initialization order.
Bug: https://issuetracker.google.com/37119593
Test: run-test 004-SignalTest
Test: m test-art-host
Test: m test-art-target
Change-Id: I7906c1f625ccca0350ea9310140a3f43a657be4c
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions