Commit graph

18130 commits

Author SHA1 Message Date
Nick Kralevich
63e5142283 am 6b86f3fe: am 5e44f5cc: am 2c58af52: Merge "VectorImpl.cpp: fix benign multiplication overflow"
* commit '6b86f3fe304c7aa4f2c629a1cacd84428aad9a3e':
  VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:46:51 +00:00
Nick Kralevich
6b86f3fe30 am 5e44f5cc: am 2c58af52: Merge "VectorImpl.cpp: fix benign multiplication overflow"
* commit '5e44f5cc0c2824827c9e87daff83e9722c549345':
  VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:38:06 +00:00
Nick Kralevich
5e44f5cc0c am 2c58af52: Merge "VectorImpl.cpp: fix benign multiplication overflow"
* commit '2c58af52232f0c8b4ab09d75eba66d1283805cab':
  VectorImpl.cpp: fix benign multiplication overflow
2015-08-28 17:28:37 +00:00
Nick Kralevich
2c58af5223 Merge "VectorImpl.cpp: fix benign multiplication overflow" 2015-08-28 16:54:02 +00:00
Nick Kralevich
c76698f24e VectorImpl.cpp: fix benign multiplication overflow
j is a ssize_t, which can go negative. If it goes negative,
the resulting multiplication of mItemSize*j doesn't make
any sense. Since the value is never used, just don't perform
the calculation if j < 0.

Bug: 23607865
Change-Id: I14f6f6506645d582f7d67a2e2d60ead3cb18b957
2015-08-28 06:40:23 -07:00
Bill Yi
0471af5e80 am 1be03a22: am 35cee267: Merge commit \'f4ba463105646df0c4d65c368fbd201cfe62d08f\' into HEAD
* commit '1be03a22072b07a7e4e4daccec88ba8e2fec35c3':
2015-08-27 23:47:04 +00:00
Bill Yi
1be03a2207 am 35cee267: Merge commit \'f4ba463105646df0c4d65c368fbd201cfe62d08f\' into HEAD
* commit '35cee267338c5b290dff99365cc734aa60e0f773':
2015-08-27 23:37:44 +00:00
Nick Kralevich
55e4ea3ea6 am b622e63c: am eb458905: am f4355868: Merge "android_memset.c: Use sanitized shifts"
* commit 'b622e63c3d2950c0fae60331955e8548a7d612ef':
  android_memset.c: Use sanitized shifts
2015-08-27 23:37:11 +00:00
Nick Kralevich
b622e63c3d am eb458905: am f4355868: Merge "android_memset.c: Use sanitized shifts"
* commit 'eb458905797166ac6385dd5fcc8ed7083c0906fa':
  android_memset.c: Use sanitized shifts
2015-08-27 23:33:00 +00:00
Bill Yi
35cee26733 Merge commit 'f4ba463105646df0c4d65c368fbd201cfe62d08f' into HEAD 2015-08-27 16:30:48 -07:00
Nick Kralevich
eb45890579 am f4355868: Merge "android_memset.c: Use sanitized shifts"
* commit 'f4355868cbce0713331bbb04b063515d6de4c795':
  android_memset.c: Use sanitized shifts
2015-08-27 23:24:35 +00:00
Yabin Cui
23f15fc09f am 13c1e5bf: am a483eae5: am 4f8d5b01: Merge "adb: disconnect: fix write-after-free memory corruption and crash."
* commit '13c1e5bf59d1b185dcd8b4c67145b64ce84d47ca':
  adb: disconnect: fix write-after-free memory corruption and crash.
2015-08-27 23:20:24 +00:00
Nick Kralevich
f4355868cb Merge "android_memset.c: Use sanitized shifts" 2015-08-27 23:17:22 +00:00
Yabin Cui
13c1e5bf59 am a483eae5: am 4f8d5b01: Merge "adb: disconnect: fix write-after-free memory corruption and crash."
* commit 'a483eae5b169571185731791dd70310cfd9e9290':
  adb: disconnect: fix write-after-free memory corruption and crash.
2015-08-27 23:13:45 +00:00
Yabin Cui
a483eae5b1 am 4f8d5b01: Merge "adb: disconnect: fix write-after-free memory corruption and crash."
* commit '4f8d5b01281e751168718c7b0a74db34352aaf1e':
  adb: disconnect: fix write-after-free memory corruption and crash.
2015-08-27 23:05:43 +00:00
Yabin Cui
4f8d5b0128 Merge "adb: disconnect: fix write-after-free memory corruption and crash." 2015-08-27 22:58:03 +00:00
Nick Kralevich
b4236a76f3 am 7815c47a: am b7699c65: am e6d3cf39: Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
* commit '7815c47ade51e6b0defd9d82a7c2ec14fb596a7c':
  android_memset.c: Use __attribute__((no_sanitize("integer")))
2015-08-27 22:17:36 +00:00
Yabin Cui
75a25fa58c am f6cee89b: am 9f91681d: am f3068123: Merge "adb: fix a fake data race on transport:kick reported by tsan."
* commit 'f6cee89b638acb53413e4cb9db1c19eac5cf3c97':
  adb: fix a fake data race on transport:kick reported by tsan.
2015-08-27 22:06:51 +00:00
Bertrand Simonnet
d17407cf98 am 03e770e9: am 414f6226: am c3f866f6: Merge "metricsd: Use system properties to store build time metadata."
* commit '03e770e9d401462ebe3af4e803f0ab2b329ffe39':
  metricsd: Use system properties to store build time metadata.
2015-08-27 22:06:27 +00:00
Nick Kralevich
f357824ce5 am a2a83a4f: am 212e4f1f: am d34f4198: Merge "strdup16to8.c: fix benign integer underflow."
* commit 'a2a83a4f4b1dfe4dccff187ae58ebf2e7b38186f':
  strdup16to8.c: fix benign integer underflow.
2015-08-27 22:06:26 +00:00
William Luh
7640e04131 am 3680dc30: am a03c55c7: am 001c87c3: Merge "Add macro to call event logger for errors."
* commit '3680dc30f859da111113c744a9fb4f7b0dd07f37':
  Add macro to call event logger for errors.
2015-08-27 22:06:11 +00:00
Mark Salyzyn
1f1564e49b am e8e51ecd: am 928c6124: am 96ac40af: Merge "logd: klogd and Mediatek"
* commit 'e8e51ecd948323615fde2f61fc1985a902d6807c':
  logd: klogd and Mediatek
2015-08-27 22:06:03 +00:00
Yabin Cui
0d67da4d54 am 8b46ad45: am 860169cb: am 804180b2: Merge "adb: fix a data race in local_socket_event_func."
* commit '8b46ad457fa75e99fa61af55a21d811da5e3b726':
  adb: fix a data race in local_socket_event_func.
2015-08-27 22:00:24 +00:00
Yabin Cui
f4b9928563 adb: disconnect: fix write-after-free memory corruption and crash.
Transport atransport objects are semi-reference counted: the input and
output threads each hold a reference. The adb disconnect command was
calling transport_unref to release a reference that it never had in the
first place. This meant that the refcount dropped to zero and the object
was deleted before either the input or output thread released its
reference. When that last thread released its reference, it wrote to
freed memory and also sometimes crashed.

This fix is to not release any unheld reference, instead it just kicks
the transport to break remote_read in output_thread. So all transport
close flow goes the following way:
output_thread (exit) -> main thread (offline the transport) ->
input thread (exit) -> main thread (destroy the transport)

Change-Id: Iad1fe718acc8716f3a79c8c22b426a1b2450452c
2015-08-27 14:41:07 -07:00
Duane Sand
c348a88376 android_memset.c: Use sanitized shifts
Avoid checks and traps on msb=1 unsigned shifts.

Change-Id: I5203a4290296b5557c0420ce0debad3b60d48233
2015-08-27 14:32:17 -07:00
Nick Kralevich
7815c47ade am b7699c65: am e6d3cf39: Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
* commit 'b7699c65508e1e0e98fef946d42214faee740bd4':
  android_memset.c: Use __attribute__((no_sanitize("integer")))
2015-08-27 21:02:12 +00:00
Nick Kralevich
b7699c6550 am e6d3cf39: Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))"
* commit 'e6d3cf393749556d6bb6b8ea51bb1252cfb061f3':
  android_memset.c: Use __attribute__((no_sanitize("integer")))
2015-08-27 20:44:40 +00:00
Nick Kralevich
e6d3cf3937 Merge "android_memset.c: Use __attribute__((no_sanitize("integer")))" 2015-08-27 20:36:08 +00:00
Nick Kralevich
d9eda62875 android_memset.c: Use __attribute__((no_sanitize("integer")))
Turn off integer sanitization on android_memset. memset()ing is
expected to be a fast operation.

Avoid the use of the "while (size--) { }" construct, which harmlessly
underflows.

Change-Id: Ia61ff2323c759bf52df7e70b8be2fae0b0366dda
2015-08-27 13:14:36 -07:00
Yabin Cui
f6cee89b63 am 9f91681d: am f3068123: Merge "adb: fix a fake data race on transport:kick reported by tsan."
* commit '9f91681d5025a22851d7f666bc574a0a9d445281':
  adb: fix a fake data race on transport:kick reported by tsan.
2015-08-27 18:34:50 +00:00
Yabin Cui
9f91681d50 am f3068123: Merge "adb: fix a fake data race on transport:kick reported by tsan."
* commit 'f3068123039e81cee85ce9103d01b5b2aceb2ba3':
  adb: fix a fake data race on transport:kick reported by tsan.
2015-08-27 18:29:50 +00:00
Yabin Cui
f306812303 Merge "adb: fix a fake data race on transport:kick reported by tsan." 2015-08-27 18:25:02 +00:00
Bertrand Simonnet
03e770e9d4 am 414f6226: am c3f866f6: Merge "metricsd: Use system properties to store build time metadata."
* commit '414f6226fc2d5ce8537b696ef0dfa72f7f245db6':
  metricsd: Use system properties to store build time metadata.
2015-08-27 18:11:22 +00:00
Nick Kralevich
a2a83a4f4b am 212e4f1f: am d34f4198: Merge "strdup16to8.c: fix benign integer underflow."
* commit '212e4f1fe1c4f8390c3cada607e00bc9d9717eba':
  strdup16to8.c: fix benign integer underflow.
2015-08-27 18:11:21 +00:00
Bertrand Simonnet
414f6226fc am c3f866f6: Merge "metricsd: Use system properties to store build time metadata."
* commit 'c3f866f60cedc7eade674a7a8eec740dd938264f':
  metricsd: Use system properties to store build time metadata.
2015-08-27 18:01:45 +00:00
Nick Kralevich
212e4f1fe1 am d34f4198: Merge "strdup16to8.c: fix benign integer underflow."
* commit 'd34f419826e74640dfe88c50d171a0cd8580eeda':
  strdup16to8.c: fix benign integer underflow.
2015-08-27 18:01:44 +00:00
Bertrand Simonnet
c3f866f60c Merge "metricsd: Use system properties to store build time metadata." 2015-08-27 17:58:23 +00:00
Nick Kralevich
d34f419826 Merge "strdup16to8.c: fix benign integer underflow." 2015-08-27 17:54:32 +00:00
Nick Kralevich
2b98a9eec0 strdup16to8.c: fix benign integer underflow.
A size_t value is not allowed to go below zero.

Change-Id: Ic888c6605d911e0b5dbee1a2fe1daf41e616e106
2015-08-27 10:30:50 -07:00
William Luh
3680dc30f8 am a03c55c7: am 001c87c3: Merge "Add macro to call event logger for errors."
* commit 'a03c55c7e4960d6b29d0c6dddc2c1bf3eca11c86':
  Add macro to call event logger for errors.
2015-08-27 16:34:58 +00:00
William Luh
a03c55c7e4 am 001c87c3: Merge "Add macro to call event logger for errors."
* commit '001c87c3cd4676ef14f7c08ade380fbb7870eda6':
  Add macro to call event logger for errors.
2015-08-27 16:26:24 +00:00
William Luh
001c87c3cd Merge "Add macro to call event logger for errors." 2015-08-27 16:22:02 +00:00
Abhishek Arya
fc8c0e1e24 am 8516d892: (-s ours) am 09f2d36e: (-s ours) am 5b33306d: Merge "libutils: fix overflow in SharedBuffer [DO NOT MERGE]" into mnc-dev
* commit '8516d892378f0998a37d60db813517cc9f57ca2f':
2015-08-27 14:38:57 +00:00
Yabin Cui
5814de06dd am cd159ba3: am 4edb97ab: (-s ours) am f03aa667: am fbdd5ee2: Merge "adb: keep all asocket operations in the main thread."
* commit 'cd159ba349e6c336f1407697d0f3e4e4be6845f6':
2015-08-27 14:38:56 +00:00
Nick Kralevich
41ff31abfb am 8955ae5a: am 3192689b: (-s ours) am 63141512: am 53f11b62: Merge "libcutils: enable LOCAL_SANITIZE := integer"
* commit '8955ae5af369a0d876b1732c4762f2972b0f6d83':
2015-08-27 14:38:54 +00:00
Nick Kralevich
548953e3f5 am ba8efa2a: am 78d632a0: (-s ours) am 38f4a139: am 532e6cde: Merge "libcutils: cleanups for -fsanitize=integer"
* commit 'ba8efa2a2f690125779864d9289e1b0efe599723':
2015-08-27 14:38:53 +00:00
Mark Salyzyn
bcee088bd8 am 929a0760: am 86c8be04: (-s ours) am 0c3177c5: am 64393789: Merge "logd: worst uid record watermark part deux"
* commit '929a076052fea8cc20bc4292727af4d59608cab0':
2015-08-27 14:38:51 +00:00
Elliott Hughes
8cb530534a am d6551839: am 8303f54a: (-s ours) am b6ae989a: am 0ac29519: Merge "Don\'t build 32-bit host libadb."
* commit 'd6551839f4c30baecd05d0fdd65d500aafcba8f0':
2015-08-27 14:38:49 +00:00
Elliott Hughes
ca1eb3dc5e am fbd87261: am 12e519cc: (-s ours) am 5e2e4fd5: am e2cda953: Merge "Fix missing <stdarg.h>."
* commit 'fbd87261aec86c3c89a25ddb0004d4d888ac3573':
2015-08-27 14:38:47 +00:00
Elliott Hughes
519e1872c7 am 97e4d754: am c32a4361: (-s ours) am f4603673: am 04b94b25: Merge "Use 64-bit file sizes in fastboot."
* commit '97e4d7540778605042982a5d64840f851772d6da':
2015-08-27 14:38:46 +00:00