summaryrefslogtreecommitdiffstats
path: root/libutils
Commit message (Collapse)AuthorAgeFilesLines
* Revert "libutilscallstack is private VNDK-SP"Jiyong Park2018-03-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | CallStack.cpp was part of libutils, but has been separated into a new library libutilscallstack [1] and then made invisible to vendors [2]. However, this is causing problem to the vendors who have been using the CallStack class from libutils, because the class is no longer available to them. In order to support them, marking libutilscallstack as 'vendor_available: true'. This reverts commit a32678df552365007fe178204264a4bdd06ddf7e. [1] https://android-review.googlesource.com/c/platform/system/core/+/591954 [2] https://android-review.googlesource.com/c/platform/system/core/+/599754 Bug: 74600214 Test: m -j Test: 2016/2017 pixel devices boots to the UI and Photo Editing works Merged-In: Iaa232ed978378b566a4710e2320ee6ed04572e14 Change-Id: Iaa232ed978378b566a4710e2320ee6ed04572e14 (cherry picked from commit 130fea3478ce3ecb6c5a64d193552c1cce98772d)
* String16: remove integer overflowsSteven Moreland2018-03-011-28/+34
| | | | | | Bug: 73826242 Test: manual Change-Id: I32e13d61b944c1a527cf2d95473552d246e322be
* libutils: remove subdirsSteven Moreland2018-02-231-2/+0
| | | | | | | | no longer used in Android Test/Bug: none Change-Id: I155d5ade02527bf47893a8bf8bcbb07b0aae53d8
* bpfmt.Elliott Hughes2018-02-162-6/+18
| | | | | | Bug: N/A Test: builds Change-Id: I89ad00e1c4c7e0767bc80a7ac7935a4d55e090ac
* libutilscallstack is private VNDK-SPJiyong Park2018-01-251-0/+1
| | | | | | | | | The library isn't intented to be exposed to vendors. It is a platform private library. Bug: 72471487 Test: Pixel 2016/2017 boots to the UI. Photo editing works. Change-Id: Ib0479a43d66d988c2f882688240746bed3213dad
* Remove libziparchive dependency on libutilsDavid Sehr2018-01-181-36/+71
| | | | | | | | Prevent future cyclic dependency from libunwind changes. Bug: 66919073 Test: make -j 50 Change-Id: I2a4fa5b7c2c3a82db2073d0fa51940da6603be1f
* Merge "Usage suggestions."Treehugger Robot2017-12-1915-3/+36
|\
| * Usage suggestions.Steven Moreland2017-12-1915-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | Providing alternative suggestions for using C++ stdlib types instead of libutils types: - higher interoperability - fewer "legacy" quirks - ability to use stl algorithms - high optimization levels Test: none Change-Id: If81aa9982ca0ad229fa13c8142387906981b054d
* | Remove CompileTimeIfElse.Steven Moreland2017-12-181-10/+0
|/ | | | | | | | | - not used anywhere - equivalent to std::conditional Test: none Bug: none Change-Id: Iffc00acb899d5159359d60c09443c7d2d7fdf2a0
* Merge "Add OWNERS."Elliott Hughes2017-12-071-0/+1
|\
| * Add OWNERS.Elliott Hughes2017-12-071-0/+1
| | | | | | | | | | | | Bug: N/A Test: N/A Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
* | Merge "Fix / suppress new unused warnings for mingw+clang"Dan Willemsen2017-11-303-6/+11
|\| | | | | | | | | | | am: f106bb6bb8 Change-Id: I4e4ac1ff248bd437dd721cac8d55b4925e7af5a8
| * Merge "Fix / suppress new unused warnings for mingw+clang"Dan Willemsen2017-11-303-6/+11
| |\
| | * Fix / suppress new unused warnings for mingw+clangDan Willemsen2017-11-293-6/+11
| | | | | | | | | | | | | | | | | | Bug: 69933068 Test: mmma system/core Change-Id: I089166a979d3d8c5ada38a7745d507b555048499
* | | Merge "libutils: Cleanup unused class declaration"Logan Chien2017-11-282-3/+0
|\| | | | | | | | | | | | | | | | | am: 23cc38d440 Change-Id: I93c1e2f9fc1d2c5ee6b1a6310952a4f7824b88a4
| * | libutils: Cleanup unused class declarationLogan Chien2017-11-222-3/+0
| |/ | | | | | | | | | | | | | | | | This commit removes unused class declaration for SharedBuffer and TextOutput. SharedBuffer has become internal implementation details since 282efae9c. TextOutput usages have been removed since 9eb2a3b1. Test: AOSP and master build w/o problems Change-Id: I1871c4919a46f1ea8f41fb7eb79b4dc800b6f6f4
* | Merge commit 'a63ccea6abc7ea02e2d98e41c80793ca97237bd3' fromXin Li2017-11-141-3/+20
|\ \ | |/ |/| | | | | | | | | oc-mr1-dev-plus-aosp into stage-aosp-master Change-Id: Ia33311cd1fd26dfaea59a69317b306fb91203c40 Merged-In: I03d06b10807e8a313c9654c2e1db36bfb59e3f99
| * Merge "Use target.linux for all linux kernel based targets" am: ab62265fa1Dan Willemsen2017-10-182-15/+7
| |\ | | | | | | | | | | | | | | | am: f973417005 Change-Id: I6bba9b0849075fe0703032d2c8f258b5ea86547f
| * | Add vendor_available to liblog_headers.Steven Moreland2017-10-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed NDK headers to "liblog_ndk_headers" (these names aren't used anywhere). libutils_headers now properly export liblog_headers. Test: with BOARD_VNDK_VERSION=current Merged-In: I3a85385f588b84393c57fd6d1bcac620f708f0f1 Change-Id: I3a85385f588b84393c57fd6d1bcac620f708f0f1 (cherry picked from commit 42b485cc538217fa127996a340229f76b7c4031b)
| * | libutils: liblog export headersSteven Moreland2017-10-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make liblog dependency for all library builds (this is required for files like String8.cpp) - export liblog headers (because they are used in many header files). Test: less libraries fail with BOARD_VNDK_VERSION := current Merged-In: Iecb9cd00deb3a9056ea63c4a087afdb80a51a2b8 Change-Id: Iecb9cd00deb3a9056ea63c4a087afdb80a51a2b8 (cherry picked from commit 43e20cac7b0f0fac603999cdb9516929b3f758dd)
| * | Merge changes from topic "linux_glibc" am: 7b3d4da91aDan Willemsen2017-10-032-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | am: 348a082469 Change-Id: Ia203b8b7bf807385b90232fedf91cef80f040279
| * \ \ Merge "Silence a use-after-free warning from the analyzer" am: 8c853c43ccGeorge Burgess IV2017-10-021-0/+5
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | am: 584853bdb0 Change-Id: I355b80ad7e59daeba569e6f9bb8eea853121acf9
| * \ \ \ Merge "Remove default libraries" am: 8b7feee38fDan Willemsen2017-09-301-2/+0
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a0113de2f3 Change-Id: I1db625d1dcf0a7d55dedc9986d527d92412e5444
| * \ \ \ \ Merge "Add "operator bool" overload to android::sp." am: 28ebfe18fbJeff Sharkey2017-09-131-3/+4
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 56c22732c6 Change-Id: I0068bb0fee78b62abe97175b2594b579b6fc8f81
| * \ \ \ \ \ Fix integer overflow in utf{16,32}_to_utf8_length am: 47efc676c8Adam Vartanian2017-09-111-3/+20
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 6e2bf89dc7 Change-Id: I15b9e020b389066973dab623a22b1d6eda981d02
| | * \ \ \ \ \ Fix integer overflow in utf{16,32}_to_utf8_lengthAdam Vartanian2017-09-111-3/+20
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 47efc676c8 Change-Id: Id54a1e644fc02a2923c6bf165205d16e43cf5eb2
| | | * | | | | | Fix integer overflow in utf{16,32}_to_utf8_lengthAdam Vartanian2017-09-071-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without an explicit check, the return value can wrap around and return a value that is far too small to hold the data from the resulting conversion. No CTS test is provided because it would need to allocate at least SSIZE_MAX / 2 bytes of UTF-16 data, which is unreasonable on 64-bit devices. Bug: 37723026 Test: run cts -p android.security Change-Id: I56ba5e31657633b7f33685dd8839d4b3b998e586
* | | | | | | | | Use -Werror in system/coreChih-Hung Hsieh2017-11-015-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move -Wall -Werror from cppflags to cflags. * Fix/suppress warning on unused variables. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I1e05e96a1d0bcb2ccef1ce456504b3af57167cc5
* | | | | | | | | Merge "libutils: Fix bug in strstr16."Treehugger Robot2017-10-242-12/+40
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ |/| | | | | | | |
| * | | | | | | | libutils: Fix bug in strstr16.Branislav Rankov2017-10-242-12/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the original code when target is an empty string strlen16() would start reading the memory until a "terminating null" (that is, zero) character is found. This may happen because "*target++", at line 300, would increment the pointer beyond the actual string. Signed-off-by: Branislav Rankov <branislav.rankov@arm.com> Signed-off-by: Tamas Petz <tamas.petz@arm.com> Test: libutils_tests --gtest_filter=UnicodeTest.strstr16* Change-Id: I213ffe061057c7fa8f34b68881e106a709557dcd
* | | | | | | | | Merge "Use target.linux for all linux kernel based targets"Dan Willemsen2017-10-182-15/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: ab62265fa1 Change-Id: I11e4bd0dae56c350a9839f95b1e85bf30490701d
| * | | | | | | | Use target.linux for all linux kernel based targetsDan Willemsen2017-10-162-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now in Android.bp files, target.linux applies to all targets running a linux kernel (android, linux_glibc, linux_bionic). So common flags/sources/etc can be combined instead of copying them to each target. Test: m Change-Id: If7ad138ea1c540c160731f86b6ccc0daa5c69b83
* | | | | | | | | Add vendor_available to liblog_headers.Steven Moreland2017-10-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed NDK headers to "liblog_ndk_headers" (these names aren't used anywhere). libutils_headers now properly export liblog_headers. Test: with BOARD_VNDK_VERSION=current Merged-In: I3a85385f588b84393c57fd6d1bcac620f708f0f1 Change-Id: I3a85385f588b84393c57fd6d1bcac620f708f0f1 (cherry picked from commit 42b485cc538217fa127996a340229f76b7c4031b)
* | | | | | | | | libutils: liblog export headersSteven Moreland2017-10-171-1/+7
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - make liblog dependency for all library builds (this is required for files like String8.cpp) - export liblog headers (because they are used in many header files). Test: less libraries fail with BOARD_VNDK_VERSION := current Merged-In: Iecb9cd00deb3a9056ea63c4a087afdb80a51a2b8 Change-Id: Iecb9cd00deb3a9056ea63c4a087afdb80a51a2b8 (cherry picked from commit 43e20cac7b0f0fac603999cdb9516929b3f758dd)
* | | | | | | | Merge changes from topic "linux_glibc"Dan Willemsen2017-10-032-2/+2
|\| | | | | | | | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | am: 7b3d4da91a Change-Id: I1cb69992882db5a265234ac808d408f1f136f0e5
| * | | | | | Merge changes from topic "linux_glibc"Dan Willemsen2017-10-032-2/+2
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]] Move host flags from linux -> host
| | * | | | | | Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]Dan Willemsen2017-10-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the future, target.linux will apply to all targets running a linux kernel (android, linux_glibc, linux_bionic). So move all current users to the specific linux_glibc. There will be another cleanup pass later that will move some instances back to target.linux if the properties should be shared with target.android and target.linux_bionic, but target.linux needs to be removed first. Test: out/soong/build.ninja identical before/after Change-Id: I72ef34689c60ce547cab2898e354b027e335f6a1 Exempt-From-Owner-Approval: build system cleanup
* | | | | | | | Merge "Silence a use-after-free warning from the analyzer"George Burgess IV2017-10-021-0/+5
|\| | | | | | | | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | am: 8c853c43cc Change-Id: I053089d33c2e46da12c6e8d72252fd73bea0debf
| * | | | | | Silence a use-after-free warning from the analyzerGeorge Burgess IV2017-10-021-0/+5
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The analyzer is known to be very conservative in the face of atomic operations (e.g. https://bugs.llvm.org/show_bug.cgi?id=34365); this case is no different. It's concerned that `delete this;` might read a different value for `flags`, and proceed to delete `refs`. Since there are many comments explaining why this won't happen (and it all looks sane to me), use a NOLINT to silence this warning. Analyzer warning: system/core/libutils/RefBase.cpp:445:5: warning: Use of memory after it is freed Bug: 27101951 Test: mma. Use-after-free warning is gone. Change-Id: Ic1623971bd1bad546fbb12a79439116c89a6762d
* | | | | / Merge "Remove default libraries"Dan Willemsen2017-09-301-2/+0
|\| | | | | | |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | am: 8b7feee38f Change-Id: Ic39ecabd37ffe06ba3a119410b5dcd4885fb584c
| * | | | Remove default librariesDan Willemsen2017-09-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on Linux. Test: m host Change-Id: I0b3c147b00a8ab6ff289b85db55b88836c905f5c Exempt-From-Owner-Approval: build system cleanup
* | | | | Merge "Add "operator bool" overload to android::sp."Jeff Sharkey2017-09-131-3/+4
|\| | | | | |/ / / |/| | | | | | | | | | | | | | | am: 28ebfe18fb Change-Id: Idc8a68835c6a13ab92ffce44507360c2d8e6d9e5
| * | | Merge "Add "operator bool" overload to android::sp."Treehugger Robot2017-09-131-3/+4
| |\ \ \
| | * | | Add "operator bool" overload to android::sp.Jeff Sharkey2017-09-131-3/+4
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This matches the overload on std::unique_ptr and friends. Test: builds, boots Bug: 13758960 Change-Id: Ieed9faa6b162c2a10fa7cf2b135c9b17564f6c88
| * | | Add vendor_available to liblog_headers.Steven Moreland2017-09-061-0/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renamed NDK headers to "liblog_ndk_headers" (these names aren't used anywhere). libutils_headers now properly export liblog_headers. Test: with BOARD_VNDK_VERSION=current Change-Id: I7b2d9e77e313e3f2ef362a19a03f4c23874d589a Merged-In: I3a85385f588b84393c57fd6d1bcac620f708f0f1
* | | Don't rely on transitively included headersJiyong Park2017-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | One must explicitly include what it need. time.h for clock_gettime Bug: 37629934 Test: build Change-Id: I992eac637f373b204aa161b0b26f5563e952c27e
* | | Mark the modules as VNDK-SP in Android.bpJustin Yun2017-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a VNDK-SP module, Android.bp must have 'vndk' tag as well as 'vendor_available: true'. The 'vndk' tag for VNDK-SP formated as follows: vndk: { enabled: true, support_system_process: true, }, VNDK-SP modules will be installed both in system/lib(64) as normal and in system/lib(64)/vndk-sp as a vendor variant. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Merged-In: I51fe0859f63ad58b7b91909e7d7d4206443228cd Change-Id: I51fe0859f63ad58b7b91909e7d7d4206443228cd (cherry picked from commit aeb68e86e4e335d4b201c46099cc2ce1256beec2)
* | | Merge "Remove TODOs for std::string removal."Steven Moreland2017-08-022-2/+0
|\ \ \ | | | | | | | | | | | | | | | | | | | | am: ceb7814c86 Change-Id: Iab64291aec5edd44ebf8856fb2d24c6d0e779bed
| * \ \ Merge "Remove TODOs for std::string removal."Treehugger Robot2017-08-022-2/+0
| |\ \ \
| | * | | Remove TODOs for std::string removal.Steven Moreland2017-07-312-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is baked into too many prebuilts. Perhaps eventually it can be removed, but this is very unlikely. Change-Id: Ie3f0095a7b48c8b60e548cf2d32d2d95c108b5fb Fixes: 35363681