Autosubmit fired before the CL was actually ready (forgot to hit "y"
on the repo upload).
Test: make checkbuild
Test: copied into the NDK and ran mmap64_fob64 test.
Bug: lots
Change-Id: I8c0400a703f319e8e230f7ba9178009ed7c88be0
While this was never an inline, this function alone has caused most of
the bug reports related to _FILE_OFFSET_BITS=64. Providing an inline
for it should allow a lot more code to build with _FILE_OFFSET_BITS=64
when targeting pre-L.
Test: make checkbuild
Test: built trivial cc_binary for LP32 against API 14 with
_FILE_OFFSET_BITS=64 set
Bug: lots
Change-Id: I8479d34af4da358c11423bee43d45b59e9d4143e
On aarch64/x86/x86_64 add a macro that inserts a cfi directive that will
stop unwinding.
For arm, clang doesn't allow emitting .cantunwind, so add a comment and
leave it the same as it current is.
Add this macro to __libc_init and __start_thread.
Also, remove duplicate compilation of libc_init_static.cpp that already
includes the static library that includes that file.
Bug: 15469122
Test: Did unwinds using new unwinder tool (unwind) and debuggerd -b
Test: and verified new unwinder works on aarch64/x86/x86_64.
Test: Verified that it works on old unwinder for aarch64/x86, but
Test: x86_64 doesn't work properly, but as well as before.
Change-Id: I77302e8f6c7ba1549d98a4a164106ee82c9ecadc
The newest of these clocks was added in Linux 2.6.12, so no need for runtime
checks.
Add CTS tests that we can actually use the various clocks.
Bug: http://b/67458266
Test: ran tests
Change-Id: I3cfd7982043d6f8d4ebdc2b29e8722334f443ce5
Also make a static library which can be used to override these symbols
in other implementations of libdl.so
Test: make
Change-Id: Id433bb07ecbfc4955c3fb7591ace971c2cda7862
Adds a necessary library, and disables the glibc host tests when
building for bionic host.
Bug: 31559095
Test: mmma bionic
Change-Id: Ie825db59a21bf8e9b4dbdadc63ff14bf8da23087
This reverts commit 81b175747d.
Reason: 02586a2a34 fixed the bug that
prevented us from using LD_PRELOAD with multiple namespaces.
Bug: 38114603
Test: 1. ./external/compiler-rt/lib/asan/scripts/asan_device_setup --lib
prebuilts/clang/host/linux-x86/clang-stable/lib64/clang/5.0/lib/linux
2. enable talkback shortcut
3. in the home screen, hold vol-up/down together
4. device does not reboots and talkback shortcut is toggled
Test: bionic-unit-tests and linker-unit-tests successful
(cherry picked from commit 6ab40bbf53)
Merged-In: I25a05927ffbb28b9fa72303652893f43918ccec6
Change-Id: If264f0ce5d7187816d3acc790b6e31d479b628ee
Not sure how this managed to cling on in AOSP master, but all the other
mentions of this constant in AOSP master are already expecting the new
value anyway.
Bug: N/A
Test: ran tests
Change-Id: I8b6b4b320eeb1c4cea1c06bea4c1e8e314ee344d
The tests that use LD_CONFIG_FILE environment variable shouldn't be run
on non-production devices because LD_CONFIG_FILE is only for debuggable
builds. We have used the build-time flag USE_LD_CONFIG_FILE, which is
set for the debuggable builds, to conditionally include or exclude the
tests. However, this can be a problem when 1) the device is not
debuggable but 2) the CTS itself is built with debuggable target. So,
instead of relying on the build-time flag USE_LD_CONFIG_FILE, the tests
now check the debuggability of the device and skip the tests when it
isn't debuggable.
Bug: 65842135
Test: 1) flash user build image to a 2017 pixel device.
2) build cts with 'userdebug' build target
3) CtsBionicTestCases pass on the device
(cherrypick of 5e3d44100be32fd5efffd0c309bd90c04cc9620c.)
Change-Id: Ib88e3b26d093e5479d52cd87db47dee5e108cac2
Stop allocating and deallocating memory as part of the test itself.
There's still the fopen, but since our stdio reuses existing structs,
that doesn't seem to be a problem in practice.
Bug: http://b/67077411
Test: ran tests with --gtest_repeat=1000
Change-Id: I99de5de0911161ec04afe75653075f1ccefb01a5
Just to avoid the possibility of an unfortunate mmap occurring in order to
grow the vector.
Bug: N/A
Test: ran tests
Change-Id: I850740461d761916a0377272664159d010da7b84
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: I56c84d206fb1e98cd7ea0d8fb875de0ebd87ea5e
Exempt-From-Owner-Approval: build system cleanup
We can mark a whole version "introduced=" rather than doing every line
separately.
Bug: N/A
Test: builds
Change-Id: I3219edc755a42ce5ff6258efb744fb5e05967a3a
It's almost 2018, Linux 3.17 -- the first kernel with getrandom(2) --
was released in October 2014, and being able to assume getrandom lets
us simplify and improve some security-related code in libc, and revert a
hack to getentropy that's been necessary in the meantime. Only the fugu
kernel doesn't have getrandom(2) at this point, and that's EOL.
Bug: http://b/67014255
Test: ran tests
Change-Id: I1736f4dd33d50fe99e7a524851180989f4c85a33
iOS 10 has <sys/random.h> with getentropy, glibc >= 2.25 has
<sys/random.h> with getentropy and getrandom. (glibc also pollutes
<unistd.h>, but that seems like a bad idea.)
Also, all supported devices now have kernels with the getrandom system
call.
We've had these available internally for a while, but it seems like the
time is ripe to expose them.
Bug: http://b/67014255
Test: ran tests
Change-Id: I76dde1e3a2d0bc82777eea437ac193f96964f138
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
Test: mmma bionic
Change-Id: I966e2f88c24fba5e412bee6b6382045a2026a8e4
This is the FreeBSD implementation, plus some tests. The FreeBSD
implementation includes the GNU extensions and seems to be what
iOS is using too, which should provide bug compatibility for app
developers.
The code unfortunately uses a lot of stack, and uses FreeBSD locale
implementation that we don't have, but it does seem better maintained
than the other BSDs.
Bug: http://b/29251134
Test: ran tests
Change-Id: Ie477b45e42a6df1319b25712098519d2b33adf67
Also set linked flag after it is linked and
call constructors. Set RTLD_NODELETE flag to
prevent accidental unloads.
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Test: bionic-unit-tests-glibc --gtest_filter=dl*
Change-Id: Ib2178849b918cbefd6f8fcfe6d1f78889fe0bf76