Sergio Giro
bb58cde899
system/core: change LruCache to use unordered_set instead of BasicHashTable
...
Towards deprecation of BasicHashTable
Change-Id: I3f3d904636a85a794cccf972f6e4a94e7f3808f5
2015-09-30 13:48:30 +01:00
Sergio Giro
21ca798137
resolved conflicts for 8dba9a7b to master
...
Change-Id: I314e3fc4dffbff1f7030533a821696692d03b33d
2015-09-23 22:03:30 +01:00
Sergio Giro
8dba9a7bf1
libutils: fix compile error in SharedBufferTest
...
Change-Id: Ib1185d417457d03efa102989a64b5b5e4eb5c82a
2015-09-23 21:22:14 +01:00
Sergio Giro
fa2f9d603c
am c565bdb6: am f777655d: resolved conflicts for 6ee734cf to stage-aosp-master
...
* commit 'c565bdb67b801fe2b4965b44e53dccfd9097993c':
libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
2015-09-23 19:50:33 +00:00
Sergio Giro
c565bdb67b
am f777655d: resolved conflicts for 6ee734cf to stage-aosp-master
...
* commit 'f777655d85af3aefa4a1683f289da1ec67988330':
libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
2015-09-23 17:15:12 +00:00
Sergio Giro
f777655d85
resolved conflicts for 6ee734cf to stage-aosp-master
...
Change-Id: Ia06c4d941d9b8828707299bb363f51fab5549897
2015-09-23 17:58:25 +01:00
Sergio Giro
d2529f2830
libutils: hide SharedBuffer by moving SharedBuffer.h to the implementation directory
...
Some methods in header files of classes using SharedBuffer need
to be moved to the implementation files accordingly
Change-Id: I891f3ace2b940ab219e4e449040bfed71c0547db
2015-09-23 16:22:59 +01:00
Brian Carlstrom
7ae1d6590b
am 16bed965: am 742d0173: am 661600dd: am 110f705e: resolved conflicts for 832a0d1c to mnc-dev
...
* commit '16bed9650aa493194b4091700ac81c9c882d96b2':
libutils: Fix integer overflows in VectorImpl.
2015-09-20 01:25:14 +00:00
Brian Carlstrom
16bed9650a
am 742d0173: am 661600dd: am 110f705e: resolved conflicts for 832a0d1c to mnc-dev
...
* commit '742d0173e8bd41e137d175c04860c532270b3f5b':
libutils: Fix integer overflows in VectorImpl.
2015-09-20 01:21:47 +00:00
Brian Carlstrom
110f705e10
resolved conflicts for 832a0d1c to mnc-dev
...
Change-Id: Ic46ee60de7bc500f4e1d5fe841524db80918a8d9
2015-09-19 17:29:42 -07:00
Brian Carlstrom
832a0d1c64
resolved conflicts for cf676a86 to lmp-mr1-ub-dev
...
Change-Id: Ifd9a44777a472ae893f894391bff7ef81456d92c
2015-09-19 16:13:00 -07:00
Narayan Kamath
419e6c3c68
libutils: Fix integer overflows in VectorImpl.
...
Use external/safe-iop to check for overflows on arithmetic
operations.
Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.
Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.
bug: 22953624
(cherry picked from commit c609c31fb5 )
Change-Id: I61644633db6b54fa230683615de9724f7fabf6fb
2015-09-09 12:05:06 +01:00
Narayan Kamath
69b9a8bf21
am 51e740f8: resolved conflicts for 32d86587 to mnc-dr-dev-plus-aosp
...
* commit '51e740f802083cc250a2f6228222bcbbcec79887':
libutils: Fix integer overflows in VectorImpl.
2015-09-08 13:07:52 +00:00
Narayan Kamath
51e740f802
resolved conflicts for 32d86587 to mnc-dr-dev-plus-aosp
...
Change-Id: I381133e7dd93f908bd3d2b42e8af83d954e428af
2015-09-08 13:59:49 +01:00
Sergio Giro
df5151d30f
libutils: add test for String8
...
Test crashes with SIGSEGV without the fix in b/23290056, passes otherwise.
Bug: 23290056
Change-Id: I6daca0aa07b5e97b004a9606a0227227fae11896
2015-09-07 17:12:45 +01:00
Dan Willemsen
c91a974e2e
am 54afdbae: am a4b8f9f1: am bfe32228: Merge "Remove USE_MINGW/CYGWIN; Whitelist windows modules"
...
* commit '54afdbaef79c7265395d0b84f54c96c7c9f11322':
Remove USE_MINGW/CYGWIN; Whitelist windows modules
2015-09-03 02:25:35 +00:00
Dan Willemsen
a4b8f9f1c2
am bfe32228: Merge "Remove USE_MINGW/CYGWIN; Whitelist windows modules"
...
* commit 'bfe322285fdbe86fdc01fdc4c711e22e894bdaee':
Remove USE_MINGW/CYGWIN; Whitelist windows modules
2015-09-03 00:39:19 +00:00
Dan Willemsen
87a419c8b1
Remove USE_MINGW/CYGWIN; Whitelist windows modules
...
CYGWIN is not supported, USE_MINGW and HOST_OS==windows are being
replaced with LOCAL_..._windows variables.
Bug: 23566667
Change-Id: I3e4a1e4097dc994cf5abdce6939e83a91758fd75
2015-09-02 17:10:35 -07:00
Narayan Kamath
c609c31fb5
libutils: Fix integer overflows in VectorImpl.
...
Use external/safe-iop to check for overflows on arithmetic
operations.
Also remove an unnecessary copy of Vector/SharedBuffer from
codeflinger and use the copy from libutils instead.
Note that some of the unit tests are somewhat useless due to
test-runner limitations : gtest's ability to filter on abort message
doesn't work when combined with messages formatted by android's logging
system.
bug: 22953624
Change-Id: I46b1ae8ca1f3a010be13aca36a091e76a97a7b70
2015-09-02 12:37:49 +01:00
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
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
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
Abhishek Arya
09f2d36e1d
am 5b33306d: Merge "libutils: fix overflow in SharedBuffer [DO NOT MERGE]" into mnc-dev
...
* commit '5b33306dba456ec906f7c9bd522681c1de137f78':
libutils: fix overflow in SharedBuffer [DO NOT MERGE]
2015-08-26 20:12:44 +00:00
Bart Sears
170bde83ae
resolved conflicts for merge of 7c327194 to lmp-mr1-ub-dev
...
Change-Id: I236367bd60046ba06669cbcdae81184f9d0a74c7
2015-08-26 12:59:28 -07:00
Sergio Giro
d95e47f136
libutils: fix overflow in SharedBuffer [DO NOT MERGE]
...
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
(cherry picked from commit 66b6eb9490 )
Change-Id: I363f49b5b3c6b7b3ac08cba2c14d72c431588c5a
2015-08-25 17:40:47 +01:00
Sergio Giro
0cc9a6e6e1
libutils: fix overflow in SharedBuffer [DO NOT MERGE]
...
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
(cherry picked from commit 66b6eb9490 )
Change-Id: Ic71dd0025b9a7588c4f3bb1c7be1bd13d2ff5105
2015-08-25 16:18:16 +01:00
Nick Kralevich
223286e396
am b37862e4: am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit 'b37862e4988f90fdbc3e2e48dd72368690579d6d':
libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 23:40:16 +00:00
Nick Kralevich
b37862e498
am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit '7ec4c228ee9d50d16306331abacb607bc70fadd8':
libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 21:51:14 +00:00
Nick Kralevich
2bcb9221d4
am 7ec4c228: am e80ec0c5: Merge "libutils: Enable LOCAL_SANITIZE := integer"
...
* commit '7ec4c228ee9d50d16306331abacb607bc70fadd8':
libutils: Enable LOCAL_SANITIZE := integer
2015-08-24 21:51:09 +00:00
Nick Kralevich
4d587f2f9a
libutils: Enable LOCAL_SANITIZE := integer
...
Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.
Change-Id: I475e5e9fb04160dd2d201e926ab2b897539f8bb6
2015-08-24 10:51:38 -07:00
Nick Kralevich
58e3d3e627
am 567bb226: am 4f0a7cb8: am 786e5e26: Merge "libutils: cleanups for -fsanitize=integer"
...
* commit '567bb2265039097d8fe272240596b12af35468c4':
libutils: cleanups for -fsanitize=integer
2015-08-24 16:27:12 +00:00
Nick Kralevich
567bb22650
am 4f0a7cb8: am 786e5e26: Merge "libutils: cleanups for -fsanitize=integer"
...
* commit '4f0a7cb8e15ce50f7da6a71c96335bd0b7394492':
libutils: cleanups for -fsanitize=integer
2015-08-24 16:02:51 +00:00
Nick Kralevich
50659902d2
am 4f0a7cb8: am 786e5e26: Merge "libutils: cleanups for -fsanitize=integer"
...
* commit '4f0a7cb8e15ce50f7da6a71c96335bd0b7394492':
libutils: cleanups for -fsanitize=integer
2015-08-24 16:02:36 +00:00
Nick Kralevich
1f28698998
libutils: cleanups for -fsanitize=integer
...
* Hashing functions rely on integer overflow behavior.
Mark those functions as safe.
* abort() if a passed in size_t value is greater than
UINT32_MAX. This can occur on 64 bit builds where size_t
is larger than uint32_t.
* Special case the index lookup for an empty sorted vector.
Without the special case, size() == 0, and size()-1 underflows.
Change-Id: I343a14b589fc8f0d221c1998ae5d6f0b9e2781f8
2015-08-24 15:52:22 +00:00
Sergio Giro
7987b83553
libutils: fix overflow in SharedBuffer
...
See
https://code.google.com/p/android/issues/detail?id=181910
Bug: 22952485
Change-Id: Idcc7e581a69436c8a623659fbd9add9e5f0d4c74
2015-08-21 14:17:32 +01:00
Abhishek Arya
d1a6188e8c
am a77a0487: am 219a006f: am fc5fdc85: am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'a77a0487525df3add570605e58a7eb3a03eca6a8':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:40:02 +00:00
Abhishek Arya
64e2d8c0dc
am 219a006f: am fc5fdc85: am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit '219a006f89a5448a9a6eeb1f37ad0088e85bd3f8':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:12:31 +00:00
Abhishek Arya
219a006f89
am fc5fdc85: am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'fc5fdc85683f87c42d5ce7bcee4e2b70ef0acdd0':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 07:05:07 +00:00
Abhishek Arya
fc5fdc8568
am e45d96d6: am 19398a71: am d34846b7: am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'e45d96d6bf592f0ae20bb021ea529acc94e0cb55':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:54:21 +00:00
Abhishek Arya
d34846b70b
am cd407a17: am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'cd407a17fe326f3e18866ddddb1c747b06a45fc0':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:23:50 +00:00
Abhishek Arya
cd407a17fe
am e0dce90b: Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
* commit 'e0dce90b0de2b2b7c2baae8035f810a55526effb':
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-21 06:18:47 +00:00
Abhishek Arya
e0dce90b0d
Fix compile failure after rIfe1dc0791040150132bea6884f1e6c8d31972d1b
...
Bug: 23290056
Change-Id: If6e22b0159de6635a8ca5305895b7718f15becc7
2015-08-20 21:55:55 -07:00
Sergio Giro
93f106b8d0
am e97682be: am a1a22b57: am e67b5848: am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
...
* commit 'e97682be0634fe773f70097bc518e5d034efe8f7':
libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:58:19 +00:00
Sergio Giro
e67b584869
am 4956c0fe: am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
...
* commit '4956c0fe1e582a8497aff34a41aeb8bf4748eef0':
libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:28:53 +00:00
Sergio Giro
4956c0fe1e
am 5b85b1d4: libutils: fix overflow in String8::allocFromUTF8
...
* commit '5b85b1d40d619c2064d321364f212ebfeb6ba185':
libutils: fix overflow in String8::allocFromUTF8
2015-08-20 22:23:47 +00:00
Sergio Giro
5b85b1d40d
libutils: fix overflow in String8::allocFromUTF8
...
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
(cherry picked from commit 4eeacbeec0 )
Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
(cherry picked from commit ebabef2752 )
2015-08-18 20:52:25 +00:00
Sergio Giro
c4abbcbdde
am f468d1e1: am 1d44be87: Merge "libutils: fix overflow in String8::allocFromUTF8"
...
* commit 'f468d1e14c0bb777d557a6a86dead260e40ff8aa':
libutils: fix overflow in String8::allocFromUTF8
2015-08-18 17:25:33 +00:00
Sergio Giro
ba71601aac
am 29c12755: Merge "libutils: fix overflow in String8::allocFromUTF8" into mnc-dev
...
* commit '29c1275519ef85fa3f30be351f19dc6e7eedbee9':
libutils: fix overflow in String8::allocFromUTF8
2015-08-18 17:19:10 +00:00
Sergio Giro
ebabef2752
libutils: fix overflow in String8::allocFromUTF8
...
Patch contributed in:
https://code.google.com/p/android/issues/detail?id=182908
Bug: 23290056
(cherry picked from commit 4eeacbeec0 )
Change-Id: Ife1dc0791040150132bea6884f1e6c8d31972d1b
2015-08-18 18:06:38 +01:00
Sergio Giro
1d44be87ff
Merge "libutils: fix overflow in String8::allocFromUTF8"
2015-08-18 17:04:07 +00:00