Commit graph

38361 commits

Author SHA1 Message Date
Elliott Hughes
31d17cf622 Merge "Document property expansion."
am: a4644c9bc4

Change-Id: I3dfaee7ccfcbe77cc5ae7cb02bf51551cbcc2f4b
2018-02-23 21:28:04 +00:00
Treehugger Robot
a4644c9bc4 Merge "Document property expansion." 2018-02-23 20:41:36 +00:00
Josh Gao
47bee24270 Merge "debuggerd_fallback: don't recursively abort."
am: e0068770e3

Change-Id: Icd587c111d9b1713fdad5622971008b4437b1719
2018-02-23 20:11:48 +00:00
Treehugger Robot
e0068770e3 Merge "debuggerd_fallback: don't recursively abort." 2018-02-23 19:58:59 +00:00
David Srbecky
c6f7a32ada Merge "Modify the offline handling interface."
am: bc8446992f

Change-Id: If934f7a4c8244544a2f7dfa71d213122f5d37137
2018-02-23 19:42:42 +00:00
David Srbecky
bc8446992f Merge "Modify the offline handling interface." 2018-02-23 19:25:02 +00:00
Elliott Hughes
7e469ce60c Document property expansion.
Bug: N/A
Test: N/A
Change-Id: I54b9d2d08d98d83060b54981b1c5dc9660b93e8f
2018-02-23 10:40:53 -08:00
David Srbecky
1f2daf1b79 Merge "Adjust DEX file reading to follow layout changes in ART."
am: 8fbdbba9f5

Change-Id: I550ee4892c6c9ec83695ea861af9953fdb5c53fb
2018-02-23 18:05:06 +00:00
David Srbecky
8fbdbba9f5 Merge "Adjust DEX file reading to follow layout changes in ART." 2018-02-23 17:53:23 +00:00
Robert Sesek
19fafd1ae9 Merge "Remove fs_config entries for webview_zygote."
am: 47354e76eb

Change-Id: I9faa6c9c4a83ba6d214e37155ebd84b724bc325f
2018-02-23 17:33:07 +00:00
Christopher Ferris
432981b905 Modify the offline handling interface.
- 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
2018-02-23 09:14:06 -08:00
Treehugger Robot
47354e76eb Merge "Remove fs_config entries for webview_zygote." 2018-02-23 17:12:17 +00:00
Josh Gao
70adac6a8a debuggerd_fallback: don't recursively abort.
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
2018-02-22 16:31:38 -08:00
Christopher Ferris
241481eb7e Merge "Change the GetAdjustedRelPc to GetPcAdjustment."
am: cdf778f5d9

Change-Id: I3f0f8a9e1a4ceea708714439e54ec06bd7a25f36
2018-02-22 17:58:03 +00:00
Christopher Ferris
cdf778f5d9 Merge "Change the GetAdjustedRelPc to GetPcAdjustment." 2018-02-22 17:44:19 +00:00
Tom Cherry
76583e1637 Merge "init: log control messages along with the process that sent them"
am: 0f8a67d6a8

Change-Id: If7e485e01fb326c6ff7920c96e02e3e59b46c04b
2018-02-22 16:36:31 +00:00
Tom Cherry
0f8a67d6a8 Merge "init: log control messages along with the process that sent them" 2018-02-22 16:21:05 +00:00
Christopher Ferris
a2ec50bf57 Change the GetAdjustedRelPc to GetPcAdjustment.
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
2018-02-21 20:16:39 -08:00
Tom Cherry
6f2d56d584 init: log control messages along with the process that sent them
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
2018-02-21 16:36:03 -08:00
Christopher Ferris
d41821eade Merge "Add ability to skip function name resolution."
am: 2733708cfb

Change-Id: If75fe6d573d44ddb6ef0e562688bea88654717b3
2018-02-21 20:33:56 +00:00
Christopher Ferris
2733708cfb Merge "Add ability to skip function name resolution." 2018-02-21 20:13:24 +00:00
Andreas Gampe
fdabcbb61a Merge "Base: Add an NDK-compiled version of libbase"
am: 9b4d7dd51e

Change-Id: If0dddc912cdb1aa49ad5c166fc136d2dc9d1896a
2018-02-21 06:45:19 +00:00
Treehugger Robot
9b4d7dd51e Merge "Base: Add an NDK-compiled version of libbase" 2018-02-21 06:37:08 +00:00
Andreas Gampe
af05f3b761 Base: Add an NDK-compiled version of libbase
To support building libraries for CTS.

Bug: 73206894
Bug: 73659009
Test: mmma system/core/base
Change-Id: I630be88f44cf5cefcb13be7959fc1a710686e29b
2018-02-21 01:59:24 +00:00
Christopher Ferris
e4b3a6aaa4 Add ability to skip function name resolution.
Bug: 73558129

Test: New unit tests pass.
Change-Id: I3a6b17d2590aacb367ab3e3a51cc85be73ad64eb
2018-02-20 17:10:23 -08:00
Tom Cherry
4ebf2495a9 Merge "Expose __android_log_buf_print and __android_log_buf_write to NDK"
am: 887b89fe5e

Change-Id: Idbbdf1940d3e6320a5ddb8d56d5ca1510abfb2ce
2018-02-21 01:00:32 +00:00
Treehugger Robot
887b89fe5e Merge "Expose __android_log_buf_print and __android_log_buf_write to NDK" 2018-02-21 00:50:34 +00:00
Tom Cherry
f157725091 Merge "Fix intermittent crash in property_service_test"
am: ca26cbc5d3

Change-Id: Ieaa5218faf9deee0443b88fff6be43d4a0877ec9
2018-02-20 23:04:33 +00:00
Tom Cherry
73ac28b408 Expose __android_log_buf_print and __android_log_buf_write to NDK
These are needed to build libbase with the NDK.

Bug: 73658597
Test: tree hugger
Change-Id: Icf4a82c5c08975731c180be155743ac63f4bfd50
2018-02-20 14:59:28 -08:00
Treehugger Robot
ca26cbc5d3 Merge "Fix intermittent crash in property_service_test" 2018-02-20 20:52:31 +00:00
Tom Cherry
b7ef7e7aff Fix intermittent crash in property_service_test
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
2018-02-20 10:47:55 -08:00
Elliott Hughes
b57755c429 Merge "bpfmt."
am: 0609e8d231

Change-Id: I810b09372da24d4b84bbeaa5d0c03ec0baf928fd
2018-02-20 02:11:33 +00:00
Treehugger Robot
0609e8d231 Merge "bpfmt." 2018-02-20 02:02:59 +00:00
George Burgess IV
894337ee0b Merge "Fix a memory leak"
am: cb1b68f9b3

Change-Id: Ia7a5fbc737d702615499bccd6492aac9ce3d0ce3
2018-02-19 10:51:47 +00:00
Treehugger Robot
cb1b68f9b3 Merge "Fix a memory leak" 2018-02-19 10:44:43 +00:00
Josh Gao
5504477722 Merge "debuggerd seccomp: explain why we define PROT_READ/WRITE."
am: 665e4c1537

Change-Id: I3762171a451d169d273a4affa3bf3c6eee7a3b3c
2018-02-19 09:49:45 +00:00
Treehugger Robot
665e4c1537 Merge "debuggerd seccomp: explain why we define PROT_READ/WRITE." 2018-02-19 09:43:22 +00:00
Justin Yun
158208cde0 Merge "Define PROT_READ and PROT_WRITE when generating the policy files"
am: a1721a5043

Change-Id: Ibb4459bac1136ce9c54b7a109bb7b7dc72986563
2018-02-19 09:39:05 +00:00
Treehugger Robot
a1721a5043 Merge "Define PROT_READ and PROT_WRITE when generating the policy files" 2018-02-19 09:33:33 +00:00
George Burgess IV
cb2449f851 Fix a memory leak
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
2018-02-19 01:05:56 -08:00
Josh Gao
edd28f6ede debuggerd seccomp: explain why we define PROT_READ/WRITE.
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
2018-02-18 23:50:19 -08:00
Justin Yun
40ecb9abf2 Define PROT_READ and PROT_WRITE when generating the policy files
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
2018-02-19 10:42:42 +09:00
Christopher Ferris
e89745202c Merge "Modify elf cache to handle elf_offsets properly."
am: 277a95bfef

Change-Id: I71c15df8d527548610cc15484f7c382e85b54552
2018-02-17 03:49:06 +00:00
Christopher Tate
e68fa81351 Merge "Fix darwin build"
am: 8c0c1ba989

Change-Id: I8acb6a80f4ab5458f01fb6196203c4c664438934
2018-02-17 03:46:53 +00:00
Christopher Ferris
277a95bfef Merge "Modify elf cache to handle elf_offsets properly." 2018-02-17 02:00:31 +00:00
Elliott Hughes
dc699a269f bpfmt.
Bug: N/A
Test: builds
Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
2018-02-16 17:58:14 -08:00
Treehugger Robot
8c0c1ba989 Merge "Fix darwin build" 2018-02-17 01:45:37 +00:00
Christopher Tate
6983112f59 Fix darwin build
Darwin needs libbase too.

Test: 'm'
Change-Id: I9d50face92b7d5a4399dbcebd39d4062477b3a2c
2018-02-16 14:54:36 -08:00
Christopher Ferris
d9575b668b Modify elf cache to handle elf_offsets properly.
Bug: 73498823

Test: All unit tests pass.
Test: Simpleperf run that previously failed, passes now.
Change-Id: Iff3a1f2f641a46ab9a0326579af3649f0c76fc65
2018-02-16 14:52:38 -08:00
Christopher Ferris
299aa7a646 Merge "Fix soname reading code."
am: 76eda07ff6

Change-Id: I659a84ac44940ac38a8d31f9a5c3cb102435da07
2018-02-16 17:31:25 +00:00