c46cbcbbf9a4c23ab8887d8e4a364a14e63c2b1b |
04-May-2017 |
Chris Forbes <chrisforbes@google.com> |
libutils: Make LightFlattenablePod safe for unaligned ptr `buffer` may not be correctly aligned here. Assignment assumes correct alignment and so then blows up on arm32. Bug: b/37920153 Test: build, boot device Change-Id: I23ef7c7f1d1511fd912b9485bba955db59e33832
tils/Flattenable.h
|
44cee05904fbedd41e8ab2b7d748e4db396ca7f2 |
28-Mar-2017 |
Mathias Agopian <mathias@google.com> |
split LightRefBase out of RefBase Bug: 36532900 Test: compiled Change-Id: I3088e1a219e04cf924744d3a0c2d374918bb6395
tils/LightRefBase.h
tils/RefBase.h
|
02ce4262dc2dc14c16a49cc62dfae65e15043d03 |
28-Mar-2017 |
Mark Salyzyn <salyzyn@google.com> |
Merge changes I96998c4b,I161bf03b am: dd0cd8d88f am: f17500474a am: 77a1fa9070 Change-Id: I5b296f6c1b01a8b2dc51c7ebbd44d599a3aa49c1
|
0484b3b5757594a43c6b646824b44643d2a007de |
11-Aug-2016 |
Mark Salyzyn <salyzyn@google.com> |
logd: ASAN cleansing A mixture of fixes and cleanup for LogKlog.cpp and friends. - sscanf calls strlen. Check if the string is missing a nul terminator, if it is, do not call sscanf. - replace NULL with nullptr for stronger typechecking. - pass by reference for simpler code. - Use ssize_t where possible to check for negative values. - fix FastCmp to add some validity checking since ASAN reports that callers are not making sure pre-conditions are met. - add fasticmp templates for completeness. - if the buffer is too small to contain a meaningful time, do not call down to log_time::strptime() because it does not limit its accesses to the buffer boundaries, instead stopping at a terminating nul or invalid match. - move strnstr to LogUtils.h, drop size checking of needle and clearly report the list of needles used with android::strnstr - replace 'sizeof(static const char[]) - 1' with strlen. Test: gTest liblog-unit-test, logd-unit-tests & logcat-unit-tests Bug: 30792935 Bug: 36536248 Bug: 35468874 Bug: 34949125 Bug: 34606909 Bug: 36075298 Bug: 36608728 Change-Id: I161bf03ba029050e809b31cceef03f729d318866
tils/FastStrcmp.h
|
c94c4d269a2eed12a64f7f8f30e9f014690a1208 |
24-Mar-2017 |
Vishwath Mohan <vishwath@google.com> |
Merge "Blacklist some vector functions for CFI."
|
27a7aa0f59cc1af578eecb5565504b341363b8b9 |
17-Mar-2017 |
Vishwath Mohan <vishwath@google.com> |
Blacklist some vector functions for CFI. This CL blacklists some vector functions (construct, copy, splat, move) that use reinterpret_cast on freshly allocated memory (where the object doesn't exist yet). This is technically correct, but not friendly for CFI, which enforces stricter checking to catch type confusion errors. Blacklisting these specific functions from CFI does not cause an appreciable coverage loss though, so this should be fine. Bug: 36219323 Test: Builds and boots, and the reinterpret error goes away on CFI builds. Test: All 98 libutils_tests pass Change-Id: I4944b179116bb1e1608d92697e95e182d8c0ac9f
tils/SortedVector.h
tils/Vector.h
|
aa1d43230cf1f80267046024b18a5589e7669763 |
23-Mar-2017 |
Adam Lesinski <adamlesinski@google.com> |
Merge "libziparchive: fix mac os breakage" am: 390f3b364c am: 7cfe1d69b0 am: cdbadafb4a Change-Id: Ie327879eaea542911603640e36f0d867e05afd61
|
b02d690336a0fb7b26338c5f663397debcbf99e2 |
23-Mar-2017 |
Adam Lesinski <adamlesinski@google.com> |
libziparchive: fix mac os breakage Add ftruncate64 to utils/Compat.h definitions for mac. Change-Id: I82cb46927be911e867b606f4f4429a5e1b1987f7 Test: builds on mac
tils/Compat.h
|
d9bcc37269b3fd2f3bb7652db5c63e2024a3c210 |
19-Mar-2017 |
Hans Boehm <hboehm@google.com> |
Merge "Add heuristic data race detection to sp<>" am: 04abdc6153 am: 12d6afe6f1 am: 764d347183 Change-Id: I6a27520e80c2adefe30b0d04ce7e470188d3ad99
|
7f0b2601d37e758e007f53f776889ae362fc246e |
15-Mar-2017 |
Hans Boehm <hboehm@google.com> |
Add heuristic data race detection to sp<> Force assignment to read the old pointer value twice, and check that it didn't change in the interim. Previous experience with Skia suggests that this has a high probability of correctly detecting a data race when it occurs, instead of potentially letting the count associated with the old pointer value get decremented twice, and corrupting the heap. This does increase the size of sp assignments, which seem to commonly get inlined. For the general case, we add a third comparison and function call. Some code reformatting to make this consistent with modern conventions and pass automated checks. Test: Booted aosp build. Ran libutils tests. Looked at generated code. Bug: 31227650 Change-Id: Id93a05c6bf10f01ee15ff1bb409611f2058f988f
tils/StrongPointer.h
|
6258cfee90ff442bf2774d8a5eea3fc00cdc638b |
16-Mar-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Formatting changes for TypeHelpers.h and Vectors.h"
|
fc3f57acbb11455bc917f9e622c526c01c3843ff |
16-Mar-2017 |
Vishwath Mohan <vishwath@google.com> |
Formatting changes for TypeHelpers.h and Vectors.h This CL nukes all spurious whitespace in the two files. Bug: 36219323 Test: Device builds and boots. Test: All 98 libutils_tests pass Change-Id: I8054a0f0ba5df95f5115dc06597eb9fd539da942
tils/TypeHelpers.h
tils/Vector.h
|
f520b73103a327ccf3df581eb1662ae278649b35 |
15-Mar-2017 |
Mathias Agopian <mathias@google.com> |
Get rid of LinearTransform It had 3 clients - one in vendor/google_athome which was disabled - one in a device specific folder, which will die out - and one in frameworks/base This reverts commit 6c942304edd136ec5b326265e249c6f1be27830b. Test: compile/run Bug: treble cleanup Change-Id: Ia76009d550c294198c083cf89718bc498b5c9e3e
tils/LinearTransform.h
|
6c942304edd136ec5b326265e249c6f1be27830b |
14-Mar-2017 |
Ian Pedowitz <ijpedowitz@google.com> |
Revert "get rid of LinearTransform" This reverts commit bcd592053ae60e569e9b24f3f2d69b218c24d174. Bug: 36206160 Test: Fugu compiles, didn't before the revert Change-Id: Id80fd4ce9db3fce03b049cf81f938187c7ddb8b0
tils/LinearTransform.h
|
bcd592053ae60e569e9b24f3f2d69b218c24d174 |
13-Mar-2017 |
Mathias Agopian <mathias@google.com> |
get rid of LinearTransform it had a single client in frameworks/base Test: compile & run Bug: treble cleanup Change-Id: I9a17bbffed4724f8a329c5a15d621293bb800d45
tils/LinearTransform.h
|
aa47993b23aff7d473085d723cbe29ef6e63da08 |
11-Mar-2017 |
Steven Moreland <smoreland@google.com> |
Merge "libutils: String\d+ make std_string private" am: 76850afa52 am: 2ebb1e5404 am: 4ba3f784ef Change-Id: I14f003992db222ef285551c6d9a8ffe71620f70d
|
2aac33512825f958fdbd0c0a2fd2651a6d779d24 |
11-Mar-2017 |
Steven Moreland <smoreland@google.com> |
libutils: String\d+ make std_string private This method is still used by prebuilts, but making it private to start the process of removing it from everywhere. Test: pass Bug: 35363681 Change-Id: I4d53f68d10c9abcca32023c4d930e99912afa697
tils/String16.h
tils/String8.h
|
f088e4e2381b4b0995b5817e11b84576e00e09e4 |
09-Mar-2017 |
Mathias Agopian <mathias@google.com> |
Remove BlobCAche from libutils it has moved to libEGL which was the only client. Test: compiled & Run Bug: vndk-stable Change-Id: Ife18727fa1c48b1be6910058867016348b7f02c1
tils/BlobCache.h
|
101573e3f59bd74f98f17a3dd81ecc83fe0a033d |
06-Mar-2017 |
Tom Cherry <tomcherry@google.com> |
Merge "Clarify that Condition::wait() can spuriously wake up" am: 514e0aa2e2 am: 675e05c48a am: df8fc09716 Change-Id: Id99d721415d93b2d3f0539bf5a2acb1995f01000
|
22dbf3947fedf988e714a4703ddf85fc41413f90 |
01-Mar-2017 |
Mathias Agopian <mathias@google.com> |
clean-up libutils includes moved Foo.h as first include of Foo.cpp, and removed redundant includes. Made NativeHandle non virtual. Test: run & compile Bug: n/a Change-Id: I37fa746cd42c9ba23aba181f84cb6c619386406a
tils/BlobCache.h
tils/NativeHandle.h
tils/RefBase.h
tils/Singleton.h
tils/StrongPointer.h
tils/Trace.h
|
f1147f7dded958de403899189b2be85446f42541 |
28-Feb-2017 |
Tom Cherry <tomcherry@google.com> |
Clarify that Condition::wait() can spuriously wake up Also, remove the clarification that Condition::signal() wakes exactly one thread as in the presence of spurious wake ups, this clarification does not provide a safe guarantee to developers. Bug: 34592766 Test: Build Change-Id: I34df02e44a70a18fe04ceda858d002ef129c1fd9
tils/Condition.h
|
477b3fc3552e8f96ee85ba4731e7d313189428e6 |
24-Feb-2017 |
Colin Cross <ccross@android.com> |
Merge "Fix multiton issue" am: 78b285b367 am: 6d7751a13b am: dafd687617 Change-Id: I7e7369361dda3df0e97169c0d06ce24c57490c7d
|
78b285b36746fcdcd1525a8da8e73cc39829e53d |
24-Feb-2017 |
Treehugger Robot <treehugger-gerrit@google.com> |
Merge "Fix multiton issue"
|
b0145091a7a7503178fe47e6bfbe0de03caa4ba0 |
23-Feb-2017 |
Colin Cross <ccross@android.com> |
Fix multiton issue I385a05a3ca01258e44fe3b37ef77e4aaff547b26 broke Singleton in the same way that 544e3e3606abebd2e5016bdb33a3ed05a1650e5b had already fixed once. Fix it again, the next CL will add tests. This affected cases where two libraries referenced the same singleton, the one that was supposed to define the singleton was already loaded, and then the second library was dlopen'd. Bug: 35674422 Test: out/host/linux-x86/nativetest64/libutils_tests/libutils_tests from later CL Change-Id: I87c64f95ed294a887e67a6c11be3072299789f01
tils/Singleton.h
|
917cca2f04a88c1b307e9a4b75582ca9ecf34444 |
23-Feb-2017 |
Tom Cherry <tomcherry@google.com> |
Merge "Make Condition use CLOCK_MONOTONIC" am: 7f932afefc am: 36ba2fbef7 am: 83f76a20a8 Change-Id: I214548f856db2826b7a4ea96a98950fee7d20a27
|
1fb04ff4e5d401d8a8caca2b4cd34706a883b536 |
23-Feb-2017 |
Tom Cherry <tomcherry@google.com> |
Make Condition use CLOCK_MONOTONIC Changes to the REALTIME clock can cause Condition::waitRelative() to timeout early or delayed. This behavior is undesired and new since https://android-review.googlesource.com/#/c/181058/ moved the underlying pthread_cond_timedwait() implementation to use absolute timeouts rather than relative ones. Having Condition use CLOCK_MONOTONIC prevents these timeout issues. Bug: 34592766 Bug: 35678943 Test: Boot bullhead Test: Ensure time changes do not cause Condition::waitRelative() to timeout early or delayed Change-Id: I3a8d7a48f9b42fe990c3c7331313b6d85aa546f9
tils/Condition.h
|
870a065800728e454e2140f8d7ac57967869f497 |
18-Feb-2017 |
Steven Moreland <smoreland@google.com> |
Merge "Vector.h: remove unused import <new>" am: 1a4e2dfdf5 am: c50fce7dac am: 4fbff753ba Change-Id: I8581d836ee94d691f7a7a6b01dd9f7f8017fe093
|
40c7ddfc09506467ac4a3f4767c8fcf52ce670e0 |
17-Feb-2017 |
Steven Moreland <smoreland@google.com> |
Vector.h: remove unused import <new> Test: pass Change-Id: I9d04c909a1bc82352f1eebe36602bf095ec3ca30
tils/Vector.h
|
a040114bcba4b202a289a6e8fafd808f779f865c |
26-Jan-2017 |
Vijay Venkatraman <vijaykv@google.com> |
Merge "Exporting C++ headers from system/core" am: 812b7d5d52 am: f484dd3401 am: a252f11da3 am: 5a8f555e49 Change-Id: Id449aadc3b9e6e263d351ce031b1f7f7bb4672b8
|
75acc7bf81d43850694d39d2c45a20ca81d99379 |
05-Jan-2017 |
Vijay Venkatraman <vijaykv@google.com> |
Exporting C++ headers from system/core Moved headers from include/libutils and include/libsysutils to libutils/include and libsysutils/include respectively, so they can be exported via these libs. They needed to be moved since Soong does not allow export from external folder. Added symlink from old locations. They are needed since Soong includes system/core/include by default. Once all modules are cleaned up to explicitly add the required libs, the symlinks will be removed. Moved headers of libutils to libutils_headers. They should be used by modules for header-only inlines. Added libutils_headers as dependency of libutils. Split of C++ headers into those that have no dependency and those that have dependency on libutils.so will be handled in a later CL. Test: Add above libs to shared lib of local module Change-Id: I122db72056b26b1f39bad1d9a0c2a1c5efda3550
tils/AndroidThreads.h
tils/Atomic.h
tils/BitSet.h
tils/BlobCache.h
tils/ByteOrder.h
tils/CallStack.h
tils/Compat.h
tils/Condition.h
tils/Debug.h
tils/Endian.h
tils/Errors.h
tils/FastStrcmp.h
tils/FileMap.h
tils/Flattenable.h
tils/Functor.h
tils/JenkinsHash.h
tils/KeyedVector.h
tils/LinearTransform.h
tils/List.h
tils/Log.h
tils/Looper.h
tils/LruCache.h
tils/Mutex.h
tils/NativeHandle.h
tils/Printer.h
tils/ProcessCallStack.h
tils/PropertyMap.h
tils/RWLock.h
tils/RefBase.h
tils/Singleton.h
tils/SortedVector.h
tils/StopWatch.h
tils/String16.h
tils/String8.h
tils/StrongPointer.h
tils/SystemClock.h
tils/Thread.h
tils/ThreadDefs.h
tils/Timers.h
tils/Tokenizer.h
tils/Trace.h
tils/TypeHelpers.h
tils/Unicode.h
tils/Vector.h
tils/VectorImpl.h
tils/misc.h
tils/threads.h
|