PR_SET_VMA takes mmap_sem, which can cause contention and reduce
performance any time many threads are created at the same time,
like app startup.
Test: camera launch performance
Bug: 122471935
Change-Id: If7fa7ad99654c01d503f694976fd92bfd30d2afd
Merged-in: If7fa7ad99654c01d503f694976fd92bfd30d2afd
(cherry picked from commit dad73ef232)
PR_SET_VMA takes mmap_sem, which can cause contention and reduce
performance any time many threads are created at the same time,
like app startup.
Test: camera launch performance
Bug: 122471935
Change-Id: If7fa7ad99654c01d503f694976fd92bfd30d2afd
Merged-in: If7fa7ad99654c01d503f694976fd92bfd30d2afd
Memory leak happen when Android data framework updates identical DNS
information to netd.
Bug: 115595601
Test: netd_unit_test, netd_integration_test
Change-Id: Idcc0956729286563603f482258f488a1ccd75e6a
Add a new mallopt flag that purges any pending decaying pages.
Test: boots and works
bug 117795621
Merged-in: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
Change-Id: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
(cherry picked from commit 8a07791fbf)
Add a new mallopt flag that purges any pending decaying pages.
Test: boots and works
bug 117795621
Merged-in: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
Change-Id: Ib250ae2b705b6a368c1efb801d6a7be54e075acb
make checkbuild gives the following error:
bionic/tests/fortify_filecheck_diagnostics_test.cpp:1:0: error: unknown value 'cortex-a55' for -mcpu
The error is because we have a clang to support the new architecture,
but not a corresponding GCC. It is not trivial to filter out an invalid
CPU, and since there is no platform code built with GCC any more, its
better to remove bionic-compile-time-tests-g++
Bug: 74404306
Change-Id: I6aa181c652abeef782fec6380dfadd066140b8b9
There is a hang when enabling leak_track since the dumping of the
leak data can wind up doing an allocation.
Add new system unit test to make sure this doesn't happen again.
Bug: 111146059
Test: Test program that leaks does not hang forever.
Test: Unit tests pass.
Change-Id: Icf99be58ba5db98ee124a471b957a086045f5870
Merged-In: Icf99be58ba5db98ee124a471b957a086045f5870
(cherry picked from commit 97b4747102)
The new malloc debug sets the num allocations field to non-zero.
Unfortunately, an old version of malloc debug incorrectly set this field.
In order to differentiate between the broken output, increment the version
number.
Bug: 74361929
Test: Ran unit tests.
Change-Id: Ia88300e324fe9d46aae0c93079ee926e088e675e
Require that users and groups found in /vendor/etc/{passwd,group}
start with vendor_. This is needed to compliance with Treble as
without this prefix, it is possible for a new system image to create a
user/group name that a vendor has already used, causing a collision.
Bug: 79528966
Test: new unit test
Merged-In: I07500641e165f41526a8101592d83fa174e7a711
Change-Id: I07500641e165f41526a8101592d83fa174e7a711
(cherry picked from commit c2b9fec50b)
Bug: 78133793
Test: Builds and ran to verify best libc routines.
Change-Id: I2299b8f0f6379c9003072764978ea917b74aee4f
(cherry picked from commit 3162eb3b81)
vdso should be available in all namespaces when present. This
bug went undetected because the way libc currently uses vdso (it
does all the lookups itself). This makes it available for the
programs that want to take advantage by dlopening it.
Bug: http://b/73105445
Bug: http://b/79561555
Test: adb shell /data/nativetest/arm/bionic-unit-tests/bionic-unit-tests --gtest_filter=dl.exec_with_ld_config_file
Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter=dl*
Change-Id: I8eae0c9848f256190d1c9ec85d10dc6ce383a8bc
Currently DNS lookups are all sent as UID 0. In N we added an
AID_DNS user, but we never used it. A separate UID allows us to
account for and route DNS traffic differently from other UID 0
traffic such as kernel-originated traffic.
(cherry picked from commit 5f02720c88)
Fix: 29420831
Bug: 70673901
Test: DNS lookups continue to work
Test: netd_{unit,integration}_test pass
Change-Id: Ife3ca7df45de51b92437d2cfe627fb4703b672fb
Merged-In: I1c76fac51bdd4804620fe8a8567c9a650b8734d9
Default search path may be different for native bridged enviroments
Bug: http://b/73105445
Test: adb shell /data/nativetest/arm/bionic-unit-tests/bionic-unit-tests --gtest_filter=dl.exec_with_ld_config_file
Change-Id: I09d32dcb8a7a3f161ccc6d58c29252e79ea5fd3e
Add new unit test that will crash without this fix.
Bug: 78900050
Test: Ran unit tests.
Change-Id: I73e1b89e965a7b399822c3a6f25cbc70d2d355e2
(cherry picked from commit c151bc3078)
When linker tries to check if a library without dt_soname is accessible
it crashes. This change fixes this problem to return false instead
(making them inaccessible from other namespaces)
This went unnoticed because vendor libraries on current
devices all have dt_soname set. This was only discovered
on one of the newer devices which has a vendor prebuilt
library without a soname.
Bug: http://b/78661414
Bug: https://issuetracker.google.com/77287902
Test: cts-tradefed run commandAndExit cts -m CtsJniTestCases
Change-Id: Idb192b4ed7a810840ba2a9177bad2360ffbb75e2
This reverts commit 2e7145c048.
When src is at the end page, the sse2 strlcpy SSE2 optimized version
can issue a movdqu instruction that can cross the page boundary. If
the next page is not allocated to that process, it leads to
segmentation fault. This is a rare but has be caught multiple times
during robustness testing.
We isolated a way to reproduce that issue outside of an Android device
and we have been able to resolve this particular case. However, we
ran some additional compliance and robustness tests and found several
other similar page crossing issues with this implementation.
In conclusion, this optimization needs to be re-written from scratch
because its design is at cause. In the meantime, it is better to
remove it.
Bug: http://b/78355649
Change-Id: If90450de430ba9b7cd9282a422783beabd701f3d
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
(cherry picked from commit 611ad621c6)
This complements __libc_init_main_thread in setting up main thread
under native bridge.
Test: run_tests
Bug: 77877742
Change-Id: I53efab66f285a1b9f0ab36d44386fa1e2621e4ba
When compiling on/for at least Lollipop, always use the fortified
versions of FD_X macros. This works around side-effect issues (which
are explicitly called out in the specification) and generally
increases robustness of code.
(cherry picked from commit 00a6d5fe0a)
Bug: 77986327
Test: mmma bionic
Test: m
Test: bionic_unit_tests
Merged-In: I9096c6872770e46ba5ab64e7375ff83fc0518e07
Change-Id: I9096c6872770e46ba5ab64e7375ff83fc0518e07