- Add a new function Backtrace::UnwindOffline that takes the stack data.
- Modify BacktraceMap::CreateOffline so it doesn't take the stack data.
This makes it easier to reuse the map object created this way.
Reusing the map object increases simpleperf speed (unwinds per second) by 50%.
Test: backtrace_test libunwindstack_test
Change-Id: I90cfbae9e50d95d8a0e3cd394b33ba36d65d45f7
Calls to abort() will always result in our signal handler being called,
because abort will manually unblock SIGABRT before raising it. This
can lead to deadlock when handling address space exhaustion in the
fallback handler. To fix this, switch our mutex to a recursive mutex,
and manually keep track of our lock count.
Bug: http://b/72929749
Test: debuggerd_test --gtest_filter="CrasherTest.seccomp_crash_oom"
Change-Id: I609f263ce93550350b17757189326b627129d4a7
This cleans up a bit of the Unwinder code to make it clear what's
going on.
Modify the offline unit tests to verify the pc and sp to make sure
that those values get computed correctly.
Test: Passes unit tests.
Test: Passes 137-cfi art tests.
Change-Id: I0787a1d77b8726d3defd08f31c7476f6798f8d0d
It's currently not clear that init stops processes due to being sent a
control message nor who sent that message.
Bug: 73343913
Test: send control messages and see the logs
Change-Id: I9e9eff2001e649814107ea961b3b747a1f6da598
There is a race in the very_long_name_35166374 test of
property_service. The test first sends a size value that is beyond
the limit that init will handle, then sends a dummy data value.
However, init closes the socket upon seeing the faulty size, and if
this happens before the test sends the dummy data, the test will crash
due to SIGPIPE.
Since there is no reason to send the dummy data at all, this change no
longer sends it to prevent the crash. It also now checks explicitly
that init returns an error through the socket.
Bug: 73619375
Test: the unit test in question
Change-Id: I2565a69fa54910cee0e15fc798445e18c91156ec
If create_service_thread fails, we'll leak `arg`.
This fixes a static analyzer complaint:
system/core/adb/services.cpp:298:13: warning: Potential leak of memory
pointed to by 'arg'
Bug: None
Test: Reran the static analyzer. No more complaints about this leak.
Change-Id: I5aec7fd78f2cc775b650501b02bdf0039d1647ca
Add a comment explaining why we define PROT_READ/PROT_WRITE, even
though a current libminijail supports both cosntants.
Bug: http://b/73273658
Test: treehugger
Change-Id: I51c1be1b1b569e94dbc9045a90bc28221b7dc9c7
When generating crash_dump.*.policy, replace PROT_READ and PROT_WRITE
to numeric constants to make the policy backward compatible with old
libminijail.so.
Bug: 73273658
Test: use the new policy in OMR1 devices
Change-Id: I936a733340ad4df8aef6562c03eb10c29ffdada2