Commit Graph

16439 Commits

Author SHA1 Message Date
Evgenii Stepanov 6c74e54544 am 1ec3ba44: am 428f626d: Merge "Read global ASAN_OPTIONS from a file."
* commit '1ec3ba4471d5883742b2500ba53ed2272539e756':
  Read global ASAN_OPTIONS from a file.
2015-08-17 01:15:19 +00:00
Nick Kralevich d717f86a3e am 64c30a79: am 084c00b8: Merge "init: add LOCAL_SANITIZE := integer"
* commit '64c30a79def4dc29749a86c00a970243a2a45f1e':
  init: add LOCAL_SANITIZE := integer
2015-08-17 01:15:17 +00:00
Evgenii Stepanov 1ec3ba4471 am 428f626d: Merge "Read global ASAN_OPTIONS from a file."
* commit '428f626d1ba9819156549c4ce5b044aadbda014b':
  Read global ASAN_OPTIONS from a file.
2015-08-17 01:10:57 +00:00
Nick Kralevich 64c30a79de am 084c00b8: Merge "init: add LOCAL_SANITIZE := integer"
* commit '084c00b80432a9b290c7b7c1b43c880de13553de':
  init: add LOCAL_SANITIZE := integer
2015-08-17 01:10:56 +00:00
Evgenii Stepanov 428f626d1b Merge "Read global ASAN_OPTIONS from a file." 2015-08-16 18:42:38 +00:00
Nick Kralevich 084c00b804 Merge "init: add LOCAL_SANITIZE := integer" 2015-08-16 15:37:35 +00:00
Nick Kralevich f90b653667 init: add LOCAL_SANITIZE := integer
Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.

Change-Id: If73e6b382f2ee645fec406805739f9684ddbb5f0
2015-08-15 15:24:23 +00:00
Elliott Hughes 92c1a37234 am 5abbd967: am 94a845d9: Merge "Lose ionice and renice to toybox."
* commit '5abbd9671758075f85385985aeaa1ae2636f316b':
  Lose ionice and renice to toybox.
2015-08-14 23:47:53 +00:00
Elliott Hughes 5abbd96717 am 94a845d9: Merge "Lose ionice and renice to toybox."
* commit '94a845d97084ed2427462c4255c8709f50b6200f':
  Lose ionice and renice to toybox.
2015-08-14 23:36:32 +00:00
Elliott Hughes 94a845d970 Merge "Lose ionice and renice to toybox." 2015-08-14 23:29:09 +00:00
Elliott Hughes 17ddfcb282 Lose ionice and renice to toybox.
Change-Id: I77264e70aeff5a2320ce178c8e7176b67b898bd9
2015-08-14 15:35:33 -07:00
David Pursell f3f5bce204 am 6a701bd9: am b53b521e: Merge "Add `adb features`."
* commit '6a701bd94b067c2ab873964f63c3d954bc59610f':
  Add `adb features`.
2015-08-14 16:13:13 +00:00
David Pursell f53c7af156 am be1f5732: am f4bda753: Merge "Add feature list to connection banner."
* commit 'be1f57325f6fe1702b0d18fcdb21efe4731a191d':
  Add feature list to connection banner.
2015-08-14 16:13:11 +00:00
David Pursell 6a701bd94b am b53b521e: Merge "Add `adb features`."
* commit 'b53b521e3753e0a2f3400dcd2c8cbf73912b0f5a':
  Add `adb features`.
2015-08-14 16:07:55 +00:00
David Pursell be1f57325f am f4bda753: Merge "Add feature list to connection banner."
* commit 'f4bda7538955adef6d66b8f9871c83db67a7cde4':
  Add feature list to connection banner.
2015-08-14 16:07:53 +00:00
David Pursell b53b521e37 Merge "Add `adb features`." 2015-08-14 16:03:43 +00:00
David Pursell f4bda75389 Merge "Add feature list to connection banner." 2015-08-14 16:01:50 +00:00
Dan Albert 90d4b739ab Add `adb features`.
Shows the features supported by the active adb server.

Change-Id: I4a58a2ca082823c43f7a49e2c62ff80df6426756
2015-08-14 08:25:23 -07:00
Dan Albert 1792c23cb8 Add feature list to connection banner.
This allows us to test for features explicitly rather than relying on
the protocol version number, allowing us to fall back gracefully if a
feature is not supported.

This will be needed for the upcoming shell upgrades for stdout/stderr
separation and exit code reporting.

Change-Id: Ibb1d8ad2611f7209901ee76d51346b453e9c5873
2015-08-14 08:24:37 -07:00
Elliott Hughes 2733c14232 am 2416b832: am 15c6de75: Merge "Start iterating USB pipe endpoints from 1."
* commit '2416b8320cdce59ae267d60d89b0ef96de6a9d95':
  Start iterating USB pipe endpoints from 1.
2015-08-14 03:21:47 +00:00
Elliott Hughes 60f9026e4e am b4aa1777: am 782daf89: Merge "Fix the Mac libbase build."
* commit 'b4aa177701a2ddcd3390eccc95c0e06cd9b587ef':
  Fix the Mac libbase build.
2015-08-14 03:21:45 +00:00
Elliott Hughes 2416b8320c am 15c6de75: Merge "Start iterating USB pipe endpoints from 1."
* commit '15c6de753020bfa029e4add5aa8bf86b44efcc2b':
  Start iterating USB pipe endpoints from 1.
2015-08-14 03:18:47 +00:00
Elliott Hughes b4aa177701 am 782daf89: Merge "Fix the Mac libbase build."
* commit '782daf892d5f68e51200a4da48e9ab1bc1dedd23':
  Fix the Mac libbase build.
2015-08-14 03:18:45 +00:00
Elliott Hughes 15c6de7530 Merge "Start iterating USB pipe endpoints from 1." 2015-08-14 03:10:56 +00:00
Elliott Hughes 782daf892d Merge "Fix the Mac libbase build." 2015-08-14 03:10:34 +00:00
Elliott Hughes 2e5ae0044a Fix the Mac libbase build.
Change-Id: I34224fa66850915ef47c88ef4c79efbc53f3f38e
2015-08-13 20:09:29 -07:00
Elliott Hughes 2d4f852da4 Start iterating USB pipe endpoints from 1.
Bug: http://b/22829602
Change-Id: I5051880730ba8fadae5d78f1d19b5d527610d4a5
2015-08-13 16:00:12 -07:00
Siva Velusamy b3d3e24585 am ba7284ae: am 4d40c03b: Merge "adb: On Mac, clear both host and device endpoints at startup"
* commit 'ba7284aee2df23d80eda3a78e73d98eaed8e16a7':
  adb: On Mac, clear both host and device endpoints at startup
2015-08-13 22:06:28 +00:00
Siva Velusamy ba7284aee2 am 4d40c03b: Merge "adb: On Mac, clear both host and device endpoints at startup"
* commit '4d40c03b0bb86050759cdb010dce04492f54ae3e':
  adb: On Mac, clear both host and device endpoints at startup
2015-08-13 21:58:50 +00:00
Siva Velusamy 4d40c03b0b Merge "adb: On Mac, clear both host and device endpoints at startup" 2015-08-13 21:51:34 +00:00
Siva Velusamy d8b48a6281 adb: On Mac, clear both host and device endpoints at startup
This CL clears both the host and device endpoints right at the
beginning when the bulk endpoints are identified. This is in general
a "good idea", but more specifically for us, it fixes the issue
that sometimes when adb quits, it clears the endpoint on the host,
but not on the device which resulted in a subsequent invocation of
adb was seeing a stall.

Bug: https://code.google.com/p/android/issues/detail?id=182151

Change-Id: I331fa6805c40d1f50c153c010ceecd2f6a4045eb
2015-08-13 14:32:50 -07:00
Elliott Hughes bf449983ce am e1c3a7c1: am 45288223: Merge "libbase: logging fixes"
* commit 'e1c3a7c19e790a9bbffb1dba012a24de0c9e53e2':
  libbase: logging fixes
2015-08-13 21:25:53 +00:00
Elliott Hughes e1c3a7c19e am 45288223: Merge "libbase: logging fixes"
* commit '45288223d0ce864b84aa2d3e0321c0276c136ae1':
  libbase: logging fixes
2015-08-13 21:20:49 +00:00
Elliott Hughes 45288223d0 Merge "libbase: logging fixes" 2015-08-13 21:10:37 +00:00
Spencer Low bdab59a861 libbase: logging fixes
Win32:

- getprogname(): call basename() which is available in mingw's crt.
  Don't potentially go recursive with DCHECK_GT().

- Use Win32 critical section instead of mutex.

Other:

- Change log_characters check to compile-time.

- Fix code that gets the basename of __FILE__. The previous code was not
  setting _file, so it didn't work.

- Save and restore errno for LOG calls. Inspired by similar Chromium code.

Change-Id: Ie7bb700918be726fa81d60177d1894d2daeff296
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-08-13 14:08:31 -07:00
Nick Kralevich 1deb03179c am 51ffedd2: am 1efef4c4: Merge "Revert "init: add LOCAL_SANITIZE := integer""
* commit '51ffedd264389730a76470408a122589f7ce3488':
  Revert "init: add LOCAL_SANITIZE := integer"
2015-08-13 18:27:36 +00:00
Nick Kralevich 51ffedd264 am 1efef4c4: Merge "Revert "init: add LOCAL_SANITIZE := integer""
* commit '1efef4c49d59446d3c589563a040b0fbbd8ed73a':
  Revert "init: add LOCAL_SANITIZE := integer"
2015-08-13 18:21:35 +00:00
Nick Kralevich 1efef4c49d Merge "Revert "init: add LOCAL_SANITIZE := integer"" 2015-08-13 18:15:11 +00:00
Nick Kralevich c307b5b7f8 Revert "init: add LOCAL_SANITIZE := integer"
flounder isn't booting

This reverts commit aea73db1e3.

Bug: 23166814
Change-Id: I36c811d1ca30e2366066142d9282bb713dae315f
2015-08-13 18:10:50 +00:00
Elliott Hughes f36aa8ec5d am 5563b77a: am 57532b2a: Merge "adb: improve network error info"
* commit '5563b77a138faa622d1ba164599bf6be88997f84':
  adb: improve network error info
2015-08-13 18:00:45 +00:00
Elliott Hughes 5563b77a13 am 57532b2a: Merge "adb: improve network error info"
* commit '57532b2a067082fa5968094c2c615f1832fa1971':
  adb: improve network error info
2015-08-13 17:54:48 +00:00
Elliott Hughes 57532b2a06 Merge "adb: improve network error info" 2015-08-13 17:49:21 +00:00
Elliott Hughes 5e60d25d66 am 1685b099: am 8836031b: Merge "adb: win32: fix shutdown deadlock"
* commit '1685b09921ae2057acbd9655778660a2e81ec6b3':
  adb: win32: fix shutdown deadlock
2015-08-13 17:15:02 +00:00
Elliott Hughes 1685b09921 am 8836031b: Merge "adb: win32: fix shutdown deadlock"
* commit '8836031b27f7c62a801501f1da7d09dc3db9686d':
  adb: win32: fix shutdown deadlock
2015-08-13 17:08:46 +00:00
Elliott Hughes 8836031b27 Merge "adb: win32: fix shutdown deadlock" 2015-08-13 17:02:16 +00:00
Elliott Hughes 56d11898aa am 80e83972: am 9537ca80: Merge "adb: start-server and kill-server error output"
* commit '80e83972d0bce74d218f72b76339e6761ad6b03b':
  adb: start-server and kill-server error output
2015-08-13 16:46:46 +00:00
Elliott Hughes 80e83972d0 am 9537ca80: Merge "adb: start-server and kill-server error output"
* commit '9537ca803f86043212bfee13e8a13b7da2a9db59':
  adb: start-server and kill-server error output
2015-08-13 16:41:25 +00:00
Elliott Hughes 9537ca803f Merge "adb: start-server and kill-server error output" 2015-08-13 16:35:36 +00:00
Spencer Low f18fc0879b adb: start-server and kill-server error output
- handle_host_request
  - When the host:kill command comes in, shutdown the socket before
    calling exit(). If we don't do this, the client will output error info
    even though everything is working ok.

- adb_connect()
  - If we can't parse the version string, explain this in error output
    and don't goto error which would try to close an fd we already closed.
  - If host:kill doesn't work, output error info. Don't try to close
    already closed fd.

- adb_main()
  - If writing the ACK somehow has an error, output error info (I doubt
    this will ever get hit).

- adb_commandline()
  - Fix typo about max port number.
  - Make 'adb kill-server' and 'adb start-server' output any detailed
    error info.

Change-Id: Id1a309cc1bf516f7f49bd332b34d30f148b406da
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-08-12 20:14:55 -07:00
Spencer Low 87e97ee305 adb: win32: fix shutdown deadlock
adb can hang at shutdown due to a deadlock relating to WSACleanup().
This works around the issue by not calling WSACleanup() which shouldn't
be done anyway since threads aren't done using Winsock at shutdown.

A quick way to reproduce the original problem is to run many instances
of adb, many of which will call exit() soon:

  for /l %i in (1,1,20) do @start adb nodaemon server

You may have to boost the 20 to 200, or set ADB_TRACE=1 or use Windows
10 instead of Windows 7, to affect the timing, but eventually there
should be hung adb processes with that repro.

A more complete fix to prevent problems like this from occuring in the
future, would be to additionally do the following:

- Investigate all static destructors that are called when exit() is
  called.

- If they don't do anything important, switch all calls to exit() to
  instead call _exit() and then ban exit() from being called.

Change-Id: Id1be3bf0053809a45f2eca4461e4c35b5ef9388d
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-08-12 18:19:16 -07:00