Commit graph

19941 commits

Author SHA1 Message Date
Elliott Hughes
1f13c1a208 Merge "Fix buffer overrun in adb wait-for-device." 2016-03-11 16:53:26 +00:00
Elliott Hughes
34e560b9a1 Fix buffer overrun in adb wait-for-device.
Bug: http://b/27444063
Change-Id: I72339d7215aae28069484b9796d71fe0c53dff96
2016-03-10 17:59:17 -08:00
Prathmesh Prabhu
a680117bb5 Merge "emulator: Use distinct serial names for simultaneous qemu pipes." 2016-03-11 00:51:44 +00:00
Sami Tolvanen
4d25e6664f Merge "Revert "mkbootimg: add version and patch level"" 2016-03-11 00:11:25 +00:00
Sami Tolvanen
3253092718 Revert "mkbootimg: add version and patch level"
This reverts commit 3edc43234a.

Bug: 27580174
Change-Id: I42dac32eb7a70498accf2b8b4fde1ed0d221ca0b
2016-03-11 00:08:42 +00:00
Mark Salyzyn
8c8acccd88 Merge "liblog: audit declare LIBLOG_ABI_PUBLIC" 2016-03-10 22:28:23 +00:00
Christopher Ferris
3f9c22c34c Merge "Add error reporting mechanism for failing Unwind." 2016-03-10 22:12:35 +00:00
Mark Salyzyn
be1d3c21b5 liblog: audit declare LIBLOG_ABI_PUBLIC
- replace <sys/cdefs.h> with local "log_cdefs.h" which
  fortifies and expands definitions, adding LIBLOG_ABI_PUBLIC,
  LIBLOG_HIDDEN, LIBLOG_ABI_PRIVATE and LIBLOG_WEAK.
- clearly tag each interface as LIBLOG_ABI_PUBLIC, LIBLOG_HIDDEN,
  LIBLOG_ABI_PRIVATE, LIBLOG_WEAK or static depending on scope
- Add -fvisibility=hidden to ensure nothing else leaks
- some code standard adjustments

Bug: 27566046
Change-Id: Ic14033c4e6d833d973beb035ddc1c6134fb35a3f
2016-03-10 13:49:38 -08:00
Christopher Ferris
206a3b9798 Add error reporting mechanism for failing Unwind.
Remove the logging of an error if a thread disappears before the unwind
can begin. This can happen, so allow the caller to determine if this
is really a problem worth logging.

Bug: 27449879
Change-Id: Ie81718d53fb0e519fa0a7db9fd5f314b72bfa431
2016-03-10 12:39:15 -08:00
Prathmesh Prabhu
d387acc9b8 emulator: Use distinct serial names for simultaneous qemu pipes.
ADB local transport for the emulator based on qemu pipes uses a socket
transport. Before this CL, multiple connection requests accepted by the
qemu pipe device would result in ADB transport with the same serial.
The register function would fail as a result, and all subsequent
connections would fail.

Test:
while true; do adb kill-server; adb devices; done
Doesn't fail for > 10 minutes.

This CL replaces an earlier CL
(I0fdcf2694516151c5f8f8e1580648b940679c981) that was unsafe for real
devices.

BUG=27441661

Change-Id: I7d801b175f3bee10fc7e0ab1b12d5623984371b9
2016-03-10 09:26:49 -08:00
Josh Gao
76ffa683fc Merge "debuggerd: make sure that we kill the process after dumping." 2016-03-10 00:00:54 +00:00
Josh Gao
f0c8723bdd debuggerd: make sure that we kill the process after dumping.
Bug: http://b/27367422
Change-Id: Icd704b1effd558904975cfc524714b51917a653f
2016-03-09 15:59:27 -08:00
James Hawkins
a347cde386 Merge "bootstat: Add more debug logging metrics to RecordFactoryReset." 2016-03-09 16:34:25 +00:00
James Hawkins
1c7e3bd629 Merge "bootstat: Add more strings to the bootreason mapping." 2016-03-09 16:25:18 +00:00
Calin Juravle
44095c6dbe Merge "Add Mips64 Runtime ISA type." 2016-03-09 10:53:57 +00:00
Ruchi Kandoi
ed608b30b5 Merge "healthd: Check if battery device exists instead of charger drivers before setting fake properties." 2016-03-09 02:35:02 +00:00
James Hawkins
45ead35222 bootstat: Add more strings to the bootreason mapping.
Bug: 27555866
Change-Id: Ieebacaa9369a744d0968b3483c4302ed47bdf9f6
2016-03-08 16:42:07 -08:00
James Hawkins
0660b307b8 bootstat: Add more debug logging metrics to RecordFactoryReset.
In an effort to track down the source of some wonky data being reported.

Bug: 27550578
Change-Id: I1f08447c0203e7982d1b44bc04b531e96358c223
2016-03-08 16:18:15 -08:00
Michael Ryleev
feaa3cecb2 Merge changes I7aca7c7c,If9582ae6
* changes:
  trusty: tipc_test: fix for building with -Wformat-security flag
  trusty: tipc_test: add tests for readv/writev APIs
2016-03-08 23:26:35 +00:00
Ruchi Kandoi
fabd490f58 healthd: Check if battery device exists instead of charger drivers before
setting fake properties.

healthd used to check for registered charger drivers to determine if the
device is an always-plugged device with no battery. This patch changes
it to check for battery instead.

Change-Id: Ie4ff5d3f21dc1a83a780a41eb0c929f66b86d631
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
2016-03-08 22:28:25 +00:00
Colin Cross
0bc37ffbc6 Merge changes Ie9594b6e,I2e050a37,Ia2bf2ccf,I4e4db704,Ifbfd14e2, ...
* changes:
  Fix mac build
  Add ABI to leak report
  Combine leaks with same stacktrace
  Fix allocator::map template argument ordering
  Fold leaks that are referenced by other leaks
  Compile some tests for the host
2016-03-08 22:26:39 +00:00
Colin Cross
33e601ac30 Fix mac build
Disable memunreachable_test for mac.

Change-Id: Ie9594b6e5dfc661c4d709b419dbcb7b610434a84
(cherry picked from commit e33686b7ca)
2016-03-08 14:25:23 -08:00
Christopher Ferris
4006add727 Merge "Don\'t fail if the new pss is less than stable."
am: 26cf352637

* commit '26cf352637fd82623218cde318b4a6799d941fca':
  Don't fail if the new pss is less than stable.
2016-03-08 18:20:03 +00:00
Christopher Ferris
26cf352637 Merge "Don't fail if the new pss is less than stable." 2016-03-08 18:09:18 +00:00
Sami Tolvanen
181f429f0f Merge "mkbootimg: add version and patch level"
am: 5417aa0cf5

* commit '5417aa0cf50bc1d5f6ea5d27de8ad7ebfa878607':
  mkbootimg: add version and patch level
2016-03-08 16:08:04 +00:00
Sami Tolvanen
5417aa0cf5 Merge "mkbootimg: add version and patch level" 2016-03-08 16:02:24 +00:00
George Burgess IV
3368bdebba Merge "Cleanup uses of sprintf so we can deprecate it."
am: 2c5b89a64a

* commit '2c5b89a64a6ba2e62299635b8d81a17b59703b4c':
  Cleanup uses of sprintf so we can deprecate it.
2016-03-08 04:16:52 +00:00
George Burgess IV
2c5b89a64a Merge "Cleanup uses of sprintf so we can deprecate it." 2016-03-08 04:14:06 +00:00
Christopher Ferris
5ccdfa6349 Don't fail if the new pss is less than stable.
Sometimes, the new pss is significantly less than the stable pss. Do
not fail if this case occurs.

Change-Id: Ic7da87275a821818e375d05cac10e84c62710c5e
2016-03-07 19:18:31 -08:00
George Burgess IV
e7aa2b2c83 Cleanup uses of sprintf so we can deprecate it.
Also cleans up two instances of open() with useless mode params, and
changes a few uses of snprintf to use sizeof(buffer) instead of
hardcoded buffer sizes.

Change-Id: If11591003d910c995e72ad8f75afd072c255a3c5
2016-03-07 18:40:40 -08:00
Colin Cross
0f10562b56 Add ABI to leak report
Add the ABI to the leak report so that it can be piped through
development/scripts/stack.

Bug: 27208635
Change-Id: I2e050a377305d48d2f904f34ea921f64e13dd00e
(cherry picked from commit 11185af983)
2016-03-07 15:52:39 -08:00
Colin Cross
c1228c7f2b Combine leaks with same stacktrace
Combine similar leaks (those with identical stack traces) into a single
leak report, and sort the resulting leaks by total leak size across all
similar leaks and their references.

Bug: 27208635
Change-Id: Ia2bf2ccf3fcbc110d1c7ba60e3b77348d1c63d8d
(cherry picked from commit 7a22e81c20)
2016-03-07 15:52:39 -08:00
Colin Cross
e4cbe0ec9a Fix allocator::map template argument ordering
allocator::map reversed Key and T from std::map

Bug: 27208635
Change-Id: I4e4db704539d01b060cb948aa573cb674da48c7d
(cherry picked from commit 4c5bccdd86)
2016-03-07 15:52:39 -08:00
Colin Cross
d6b3a2a0a3 Fold leaks that are referenced by other leaks
Find leaks that have no references at all, or are only referenced by
other leaks in the same strongly connected component, and hide all
referenced leaks.

Bug: 27208635
Change-Id: Ifbfd14e24e2ba0f8af7c1b887e57f34362720f2d
(cherry picked from commit 8e8f34c558)
2016-03-07 15:52:39 -08:00
Colin Cross
54a1610404 Compile some tests for the host
Compile some tests for the host to ease debugging with valgrind or gdb.

Bug: 27208635
Change-Id: Ib46fcfa333ceb721f26efca00b2fa60b9fba44e6
(cherry picked from commit b8e20f557f)
2016-03-07 15:52:39 -08:00
Elliott Hughes
e6310fcb8e Merge "Remove toolbox prlimit."
am: a6680f78d4

* commit 'a6680f78d4665b2a936f76311e6f60eb930992c8':
  Remove toolbox prlimit.
2016-03-07 23:03:14 +00:00
Elliott Hughes
a6680f78d4 Merge "Remove toolbox prlimit." 2016-03-07 22:49:21 +00:00
Elliott Hughes
15ca17cabc Remove toolbox prlimit.
Use /system/bin/ulimit -p instead.

Change-Id: I4f2e2f2f2ac98de9ce57a7def3636669ea0034fe
2016-03-07 14:02:32 -08:00
Sami Tolvanen
3edc43234a mkbootimg: add version and patch level
Adds operating system version and security patch level to the boot
image header. This change takes over two existing unused fields to
preserve compatibility with existing devices.

Bug: 27498078
Bug: 22914603
Change-Id: I57682611e0c27fec5ed284da7d9a788383ff98b1
2016-03-07 08:56:01 -08:00
Josh Gao
6aafa03c60 Merge changes I93514d22,I57dbc113,I707ffbd1
am: 1cd680ce75

* commit '1cd680ce759effd33602de82197790fb027c1721':
  adb: wait for restore to complete before returning.
  adb: wait for adbd to die and respawn in root/unroot.
  adb: make ScopedFd universally accessible and useful.
2016-03-05 03:08:43 +00:00
Josh Gao
97b9935fba Merge "adbd: fix spurious close of uninitialized fd."
am: 3c608c7425

* commit '3c608c7425f9201c7e673d2f47bb4e1ffe93d216':
  adbd: fix spurious close of uninitialized fd.
2016-03-05 03:08:34 +00:00
Josh Gao
1cd680ce75 Merge changes I93514d22,I57dbc113,I707ffbd1
* changes:
  adb: wait for restore to complete before returning.
  adb: wait for adbd to die and respawn in root/unroot.
  adb: make ScopedFd universally accessible and useful.
2016-03-05 03:04:47 +00:00
Josh Gao
3c608c7425 Merge "adbd: fix spurious close of uninitialized fd." 2016-03-05 03:04:37 +00:00
Josh Gao
fcb063ce37 adbd: fix spurious close of uninitialized fd.
forkpty only returns an fd on the master side; trying to keep track of
it on both sides is incorrect.

Bug: http://b/27504427
Change-Id: Ia4a454d8490c77738f9c3350a4236b3d99c8758b
2016-03-04 18:08:18 -08:00
Chih-Hung Hsieh
d0b09603dd Merge "Make CHECK(x) work with static analyzer."
am: d02e6887ca

* commit 'd02e6887cacdd3fee17f391f2a77a8310bef4204':
  Make CHECK(x) work with static analyzer.
2016-03-05 00:24:24 +00:00
Chih-hung Hsieh
d02e6887ca Merge "Make CHECK(x) work with static analyzer." 2016-03-05 00:21:07 +00:00
Josh Gao
d26abed750 adb: wait for restore to complete before returning.
If we return before waiting for the other side to finish, it'll get sent
SIGHUP.

Bug: http://b/27414382
Change-Id: I93514d2242ed0d7aa93a6ec6836270dc0783506d
2016-03-04 15:51:03 -08:00
Josh Gao
d26212207d adb: wait for adbd to die and respawn in root/unroot.
Bug: http://b/19749057
Change-Id: I57dbc113803b6fd3016c1801410be0f4023245d9
2016-03-04 15:48:39 -08:00
Josh Gao
f0d3b4fc11 adb: make ScopedFd universally accessible and useful.
Change-Id: I707ffbd10958e7449b4c95dff48638480c746939
2016-03-04 15:15:56 -08:00
Chih-Hung Hsieh
0ece9f4ccd Merge "Use unique_ptr to free objects when ASSERT* fail."
am: 93aedcaf2b

* commit '93aedcaf2b3c06aa63ee8daad603d8d7b21f6731':
  Use unique_ptr to free objects when ASSERT* fail.
2016-03-04 20:32:40 +00:00