-Wclass-memaccess
-Winvalid-offsetof
-Wsequence-point
-Wzero-as-null-pointer-constant (turned on in ag/4503295)
Bug: 285204695
Test: m libutils_binder_sdk
Change-Id: I5b988f498cb8e0cf04617a4f7fd41ba9970d321d
Previously, in C++20 mode, using <=> on String8 or String16 would
compare the pointer values from the implicit conversion operators
returning const char* and const char16_t*. Instead, compare the string
content. This is especially a problem with STL containers that prefer
<=> when it is available.
See https://godbolt.org/z/cc1hW17h3 for a demo of the problem.
Bug: 339775405
Test: treehugger
Change-Id: I5ee6af96dee0c9968a1bab1ad96729e45bb1ac50
Avoid calling constructors/destructors for
each element, when we have Vector<T*>. These
are used in libbinder and elsewhere.
std::vector is still faster but uses more mem.
Bugs: me
Test: boot && binderLibTest
Change-Id: Id1239daddd018f8eee5480d1cb6dd25d6f4df808
There is a check for WEAKS_AVAILABLE that is never set. Change this so
so it is available everywhere except apple/windows.
Add new test to verify that on Android the logStackInternal function is
defined.
Bug: 331489939
Test: All unit tests pass.
Change-Id: Ie982eba30ae421931a62718d39ff1f0c282453db
As of VNDK deprecation, any libraries that defines vndk is no longer
valid anymore. This change removes all VNDK definition(s) from modules
which was VNDK. Any former VNDK-SP libraries will be marked as double-loadable,
so it can keep be able to be referenced by LLNDK libraries.
Bug: 328994089
Test: AOSP CF build succeeded
Change-Id: I1662f16e5e446bb28167b0bb278cd63997267d2a
A constexpr ctor is useful for static initialization.
We also modernize the unit test for static variable best practices.
Test: atest libutils_binder_test
Change-Id: If42c0939fb1a2dcb8eb101ed0e10051f67e2150d
Fixes build errors when using callstack library in gfxstream
project, where the definition is already made.
Test: build
Change-Id: I80d4038160725b5dc70f9af93d338aca66a2f0d5
To help cases where kernel drivers do not
implement poll events correctly.
Bug: 316829336
Test: boot
Change-Id: Ibad16a8e8e061a5be8cede7e8680c3095d6e6f32
libz is no longer statically linked into libunwindstatck, so needs to be
added explicitly to the static libs of this test
Bug: 281077552
Test: presubmits
Change-Id: Ia04b63cb8dfd5e80536a188a35d036dd3e4fd775
The ABI checking rules for VNDK will be deleted from the main branch.
To keep monitoring the ABI, the check must be enabled explicitly.
Test: m libutils.vendor
Bug: 314010764
Change-Id: I762dec1ed7de014db653663d2917a19df5076fc8
When enabling DEBUG_CALLBACKS , compiler complains
for the undeclared identifier 'fd'.
Fix by removing undeclared objects.
Change-Id: I751a9ef9d8843350105acd6a30645f897050ffa4
Useful when dealing with raw pointers in unavoidable places. Avoids
an awkward (and "slow") dance of mySp->incStrong(0); mySp->get(); ~mySp;
Test: make && atest --host libutils_binder_test
Change-Id: Ib8d46150592725cc256779bccfed19a16dce78b2
This isolated all libutils_binder headers from libutils
except for RefBase use of CallStack.h. This header can
be disabled with a macro option easily.
Bug: N/A
Test: N/A
Change-Id: I83af091fc17b5418ab9e4d7fc41fb43792ec547d
Dependencies of libbinder, so we can build
a core libbinder library, libbinder_sdk.
This is preparing the way to move this part of libbinder
together with binder code into a single project.
Bug: 302720583
Change-Id: Icff078ac6e36c7f2b91cf815d5b9ed19b2e706e1
utils/Log.h is one less file we need if we're
splitting up this library for binder.
Bug: 302720583
Test: build
Change-Id: Ibc7ec5402df342627f465354d7cf59e98f450a31
This method was preserved under assumption it would be baked into many
prebuilts, but since it's inline, there should be no linkage to libutils
- thus, should be safe to remove anyway.
Bug: 35363681
Bug: 295394788
Test: treehugger
Change-Id: I59964935600e9e786424136177bfc8a70bebec67
It is not necessary to compare the dumps with the library installed in
system partition.
Test: m out/target/product/generic_x86_64/lsdump_paths.txt
Bug: 280008249
Change-Id: I8fc39ad17d37cd43bf1d77ba23dde55d05dadce1