Switch aarch64 to __builtin_bswap16.
It generates the same code.
Bug: 18597513
Change-Id: I164296da8c676668983dd93697c6dfa05f10ec56
It generates the same code.
Bug: 18597513
Change-Id: I164296da8c676668983dd93697c6dfa05f10ec56
Merge "Fix soinfo_unload"
Fix soinfo_unload
1. Take into consideration that the local_group_root_
is not set for all of not linked libraries.
2. We need to check visited list earlier to avoid double
soinfo_free.
Change-Id: Iabc0a06a97c63f7e6bd4641731f50bb1466fed4f
1. Take into consideration that the local_group_root_
is not set for all of not linked libraries.
2. We need to check visited list earlier to avoid double
soinfo_free.
Change-Id: Iabc0a06a97c63f7e6bd4641731f50bb1466fed4f
Merge "Remove __ARM_HAVE_HALFWORD_MULTIPLY."
Remove __ARM_HAVE_HALFWORD_MULTIPLY.
Bug: 18556103
Change-Id: I17e498539f77ddf7d1fb980ee93155d3c3ccd85e
Bug: 18556103
Change-Id: I17e498539f77ddf7d1fb980ee93155d3c3ccd85e
Merge "Remove __ARM_HAVE_LDREXD."
Remove __ARM_HAVE_LDREXD.
No one uses this.
Bug: 18556103
Change-Id: Icecc3a7b5cb0a36960f27d030d8f4f8ee471f86c
No one uses this.
Bug: 18556103
Change-Id: Icecc3a7b5cb0a36960f27d030d8f4f8ee471f86c
Merge "Kill <machine/exec.h>."
Merge "Extract bionic-prepare-run-on-host to inc file."
Extract bionic-prepare-run-on-host to inc file.
Make benchmark run-on-host depend on bionic-prepare-run-on-host.
Change-Id: I0bdbf561b2580d607a49b7c83cc273320ac55429
Make benchmark run-on-host depend on bionic-prepare-run-on-host.
Change-Id: I0bdbf561b2580d607a49b7c83cc273320ac55429
Merge "Avoid pathological behavior in OpenBSD's fread."
Avoid pathological behavior in OpenBSD's fread.
Bug: https://code.google.com/p/android/issues/detail?id=81155
Bug: 18556607
Change-Id: Idc60976b79610e2202cc42dc393dcb4ca6c42e05
Bug: https://code.google.com/p/android/issues/detail?id=81155
Bug: 18556607
Change-Id: Idc60976b79610e2202cc42dc393dcb4ca6c42e05
Merge "Fix mips build"
Merge "Create /system/lib(64)? symlinks for host tests."
Fix mips build
Change-Id: Iddbf06784d19556a55d833e20a68e6ccf5a7c5be
Change-Id: Iddbf06784d19556a55d833e20a68e6ccf5a7c5be
Create /system/lib(64)? symlinks for host tests.
Replace LD_LIBRARY_PATH with default path for
the tests run on host.
Bug: 18589961
Change-Id: Id4a84b73d25c2ca9c557fcfa19b8169daeaa016b
Replace LD_LIBRARY_PATH with default path for
the tests run on host.
Bug: 18589961
Change-Id: Id4a84b73d25c2ca9c557fcfa19b8169daeaa016b
Merge "Use mmap to create the pthread_internal_t."
Merge "Count references for groups instead of instances"
Count references for groups instead of instances
Count references on the group level to avoid
partially unloading function that might be
referenced by other libraries in the local_group
Bonus: with this change we can correctly unload recursively
linked libraries. is_recursive check is removed.
Also dynamic executables (not .so) with 0 DT_NEEDED libraries
are now correctly linked.
Change-Id: Idfa83baef402840599b93a875f2881d9f020dbcd
Count references on the group level to avoid
partially unloading function that might be
referenced by other libraries in the local_group
Bonus: with this change we can correctly unload recursively
linked libraries. is_recursive check is removed.
Also dynamic executables (not .so) with 0 DT_NEEDED libraries
are now correctly linked.
Change-Id: Idfa83baef402840599b93a875f2881d9f020dbcd
Use mmap to create the pthread_internal_t.
Bug: 16847284
Change-Id: I488fa236f57aa3acb29b4ffbbab2fab51b0653be
Bug: 16847284
Change-Id: I488fa236f57aa3acb29b4ffbbab2fab51b0653be
Merge "restore sigprocmask in setjmp/longjmp test."
restore sigprocmask in setjmp/longjmp test.
Bug: 18571921
Change-Id: Ib8ca7a36abd3ccc729c20c0e32d45b1b33069f65
Bug: 18571921
Change-Id: Ib8ca7a36abd3ccc729c20c0e32d45b1b33069f65
Merge "Resolve "unused DT entry" warnings for DT_VERNEED and DT_VERNEEDNUM."
Resolve "unused DT entry" warnings for DT_VERNEED and DT_VERNEEDNUM.
Change-Id: Id18310811a6d183878a1d4d26cc2498f4fd00c55
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Change-Id: Id18310811a6d183878a1d4d26cc2498f4fd00c55
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Merge "Specify .cpu cortex-a15"
Merge "Build our benchmarks against glibc too."
Build our benchmarks against glibc too.
Bug: 18556607
Change-Id: I455ac8b93c0835836180e549486bc52d393ee6a6
Bug: 18556607
Change-Id: I455ac8b93c0835836180e549486bc52d393ee6a6
Merge "Benchmark fread/fwrite both buffered and unbuffered."
Merge "Fix running the bionic benchmarks on the host."
Benchmark fread/fwrite both buffered and unbuffered.
Bug: 18556607
Change-Id: I53905aedcea75fe550d9c423fb701c2c9bf8e831
Bug: 18556607
Change-Id: I53905aedcea75fe550d9c423fb701c2c9bf8e831
Fix running the bionic benchmarks on the host.
Bug: 18556607
Change-Id: I4e75bfcde788b43e1926be1b0146acf09b496390
Bug: 18556607
Change-Id: I4e75bfcde788b43e1926be1b0146acf09b496390
Merge "support _POSIX_CPUTIME"
Merge "libc: Fix headers to allow direct inclusion."
libc: Fix headers to allow direct inclusion.
These headers are missing a few #includes to allow their direct
inclusion from C
http://b.android.com/79841
Change-Id: Ifc712c17f4da70b26adb67d4d49ed659f53c3621
These headers are missing a few #includes to allow their direct
inclusion from C
http://b.android.com/79841
Change-Id: Ifc712c17f4da70b26adb67d4d49ed659f53c3621
Specify .cpu cortex-a15
When building with clang without this change, as errors out saying pldw
is an unsupported instruction (because it isn't part of the ARMv7 core
instruction set).
Let as know using pldw is fine.
Change-Id: Ie1f9c4b873e93ab2b3b374d2d46e476a4e581710
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
When building with clang without this change, as errors out saying pldw
is an unsupported instruction (because it isn't part of the ARMv7 core
instruction set).
Let as know using pldw is fine.
Change-Id: Ie1f9c4b873e93ab2b3b374d2d46e476a4e581710
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
Merge "Add error-check when mapping socket to fd"
Add error-check when mapping socket to fd
The call to fdopen can fail in several ways.
The fprintf on the next line will then dereference a
NULL-pointer FILE*.
Added a NULL-check, closed the socket, returned system error
and added a comment about it.
Change-Id: I7a6b26aa3c79452b1fdd76af12dfa75da88cbad7
The call to fdopen can fail in several ways.
The fprintf on the next line will then dereference a
NULL-pointer FILE*.
Added a NULL-check, closed the socket, returned system error
and added a comment about it.
Change-Id: I7a6b26aa3c79452b1fdd76af12dfa75da88cbad7
Merge "Move a private x86-64 header file out of the limelight."
Move a private x86-64 header file out of the limelight.
Currently this is on everyone's include path and is getting exported
via the NDK.
Change-Id: Ia417839fb65c7e0afddcd9fae3438665dae8e752
Currently this is on everyone's include path and is getting exported
via the NDK.
Change-Id: Ia417839fb65c7e0afddcd9fae3438665dae8e752
Merge "[MIPS] Rewrite of setjmp/longjmp for mips64 and mipsr6"
Merge "bionic tests: add setjmp/_setjmp/sigsetjmp tests."
bionic tests: add setjmp/_setjmp/sigsetjmp tests.
Bug: 17288973
Change-Id: I2808eee58cbddae1b16fbe19a715b72d6dbaaec3
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Bug: 17288973
Change-Id: I2808eee58cbddae1b16fbe19a715b72d6dbaaec3
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Merge "Revert "Use mmap to create the pthread_internal_t.""
Revert "Use mmap to create the pthread_internal_t."
Unfortunately, this change provokes random crashes for ART, and
I have seen libc crashes on the device that might be related to it.
Reverting it fixes the ART crashes. there is unfortunately no
stack trace for the crashes, but just a "Segmentation fault" message.
This reverts commit cc5f6543e3f91385b9a912438965b7e8265df54a.
Change-Id: I68dca8e1e9b9edcce7eb84596e8db619e40e8052
Unfortunately, this change provokes random crashes for ART, and
I have seen libc crashes on the device that might be related to it.
Reverting it fixes the ART crashes. there is unfortunately no
stack trace for the crashes, but just a "Segmentation fault" message.
This reverts commit cc5f6543e3f91385b9a912438965b7e8265df54a.
Change-Id: I68dca8e1e9b9edcce7eb84596e8db619e40e8052
[MIPS] Rewrite of setjmp/longjmp for mips64 and mipsr6
Change-Id: Idcd13413520dd503bc9cf782553675313e500a83
Change-Id: Idcd13413520dd503bc9cf782553675313e500a83
Merge "Use mmap to create the pthread_internal_t."
Use mmap to create the pthread_internal_t.
Bug: 16847284
Change-Id: Ic8c85f95afac1d8422ecb69674c688d1fecb6a44
Bug: 16847284
Change-Id: Ic8c85f95afac1d8422ecb69674c688d1fecb6a44
Merge "flesh out sysconf(3) and the _POSIX_* constants"
Merge "Sync with upstream OpenBSD fts.c."
Merge "Move some pthread functions to signal.h."
Sync with upstream OpenBSD fts.c.
Change-Id: Ia7e26b603f6461095b5a8d7e8a6cdf4f8279fa84
Change-Id: Ia7e26b603f6461095b5a8d7e8a6cdf4f8279fa84
flesh out sysconf(3) and the _POSIX_* constants
Bug: 17571891
Change-Id: I81036615486bde65969ae5662587fcc88348474e
Bug: 17571891
Change-Id: I81036615486bde65969ae5662587fcc88348474e
Merge "Bring our <machine/endian.h> files back in sync."
Bring our <machine/endian.h> files back in sync.
They'd drifted slightly which led to a compilation error in toybox,
which was assuming pid_t was defined. arm and arm64 were picking it
up via <endian.h> but x86 wasn't.
Change-Id: I58401e6c0066959dfc3b305b020876aaf7074bbf
They'd drifted slightly which led to a compilation error in toybox,
which was assuming pid_t was defined. arm and arm64 were picking it
up via <endian.h> but x86 wasn't.
Change-Id: I58401e6c0066959dfc3b305b020876aaf7074bbf
Merge "Mips: remove arch-specific atexit.h"
Mips: remove arch-specific atexit.h
Change-Id: I687ff4ead6c5e81db44782bf851cb84f87bfe085
Change-Id: I687ff4ead6c5e81db44782bf851cb84f87bfe085
Merge "Mips: Remove unused files"
Mips: Remove unused files
Change-Id: If98b832ee32f6dcd9f5d7ae21c601c210adfad6b
Change-Id: If98b832ee32f6dcd9f5d7ae21c601c210adfad6b
Merge "Mips: Reuse atexit.h from libc/arch-common"
Mips: Reuse atexit.h from libc/arch-common
Change-Id: Ica1670e6d3d1b6b0c64df93720efa65586e67727
Change-Id: Ica1670e6d3d1b6b0c64df93720efa65586e67727
Merge "Revert "<sched.h> should offer both __sched_priority and sched_priority.""
Move some pthread functions to signal.h.
POSIX specifies that pthread_kill(3) and pthread_sigmask(3) are
supposed to live in signal.h rather than pthread.h.
Since signal.h now needs pthread_t and pthread_attr_t, I've moved
those defintions into include/machine/pthread_types.h to keep the
namespace clean. I also sorted some includes. The combination of these
two things seems to have exploded into a cascade of missing includes,
so this patch also cleans up all those.
Change-Id: Icfa92a39432fe83f542a797e5a113289d7e4ad0c
POSIX specifies that pthread_kill(3) and pthread_sigmask(3) are
supposed to live in signal.h rather than pthread.h.
Since signal.h now needs pthread_t and pthread_attr_t, I've moved
those defintions into include/machine/pthread_types.h to keep the
namespace clean. I also sorted some includes. The combination of these
two things seems to have exploded into a cascade of missing includes,
so this patch also cleans up all those.
Change-Id: Icfa92a39432fe83f542a797e5a113289d7e4ad0c
Revert "<sched.h> should offer both __sched_priority and sched_priority."
This was only ever added to keep strace compiling, but strace has
since (actually, prior) fixed their source to use the less ugly name,
so we don't need this anymore (good riddance, #define!).
This reverts commit bbb34f9536db8234b0b43bd5333256fa4accc50e.
This was only ever added to keep strace compiling, but strace has
since (actually, prior) fixed their source to use the less ugly name,
so we don't need this anymore (good riddance, #define!).
This reverts commit bbb34f9536db8234b0b43bd5333256fa4accc50e.
Merge "Rename test_forked -> test_isolated"
Rename test_forked -> test_isolated
Change-Id: Ie72627e986c159832cbd3635d8ff5b1af3d5b1eb
Change-Id: Ie72627e986c159832cbd3635d8ff5b1af3d5b1eb
Merge "Add test_forked() option"
Add test_forked() option
Executing test via test_forked() allows us to
avoid undesired global state changes in tests like
atexit, dlopen(.., RTLD_NODELETE) and similar.
Change-Id: I118cdf009269ab5dd7b117c9b61dafa47de2a011
Executing test via test_forked() allows us to
avoid undesired global state changes in tests like
atexit, dlopen(.., RTLD_NODELETE) and similar.
Change-Id: I118cdf009269ab5dd7b117c9b61dafa47de2a011
Merge "Make the ftw(3) tests a bit more thorough."
Merge "Fix flockfile(3) and friends for stdin/stdout/stderr too."
Make the ftw(3) tests a bit more thorough.
These also test much of fts(3).
Change-Id: Ia9245d6acbbd071191563ab1b91a400044104028
These also test much of fts(3).
Change-Id: Ia9245d6acbbd071191563ab1b91a400044104028
Fix flockfile(3) and friends for stdin/stdout/stderr too.
stdin/stdout/stderr are special; their mutexes are initialized by
__sinit. There's no unit test for this, because __sinit has already
been called by the time the first unit test runs, but you could
reproduce this failure with a trivial main() that calls flockfile
or ftrylockfile on one of the standard streams before otherwise
using stdio.
Bug: 18208568
Change-Id: I28d232cf05a9f198a2bed61854d8047b23d2091d
stdin/stdout/stderr are special; their mutexes are initialized by
__sinit. There's no unit test for this, because __sinit has already
been called by the time the first unit test runs, but you could
reproduce this failure with a trivial main() that calls flockfile
or ftrylockfile on one of the standard streams before otherwise
using stdio.
Bug: 18208568
Change-Id: I28d232cf05a9f198a2bed61854d8047b23d2091d
Merge "Yet another relocation test"
Yet another relocation test
This time we check if a -> b -> c function in 'a' relocates against
implementation in 'c'.
Change-Id: I528180c3efd346bd447ea0237e5a8a0ac3cc031f
This time we check if a -> b -> c function in 'a' relocates against
implementation in 'c'.
Change-Id: I528180c3efd346bd447ea0237e5a8a0ac3cc031f
Merge "libc: Move <sgidefs.h> to libc/arch-mips/"
Merge "fix shared gid support in getpwnam/getgrnam"
fix shared gid support in getpwnam/getgrnam
Bug: 18374693
Change-Id: I5353403cbbead6f6abac87bee2cf53a60dba408c
Bug: 18374693
Change-Id: I5353403cbbead6f6abac87bee2cf53a60dba408c
Merge "Fix jump to unmapped memory on atexit"
Fix jump to unmapped memory on atexit
Split d-tor calls and soinfo_free to 2 separate steps
Bug: 18338888
Change-Id: Idbcb7242ade16fa18cba7fe30505ebd8d6023622
Split d-tor calls and soinfo_free to 2 separate steps
Bug: 18338888
Change-Id: Idbcb7242ade16fa18cba7fe30505ebd8d6023622
libc: Move <sgidefs.h> to libc/arch-mips/
This is a MIPS-only header, and should not be part of the common
headers. See http://b.android.com/79841 for context.
Change-Id: I610bc3ff626b57e7854dad15a4a2f67e1e5ded75
This is a MIPS-only header, and should not be part of the common
headers. See http://b.android.com/79841 for context.
Change-Id: I610bc3ff626b57e7854dad15a4a2f67e1e5ded75
Merge "libc: Fix mktime returns an uncorrect time in empty TZ case"
Merge "bionic/test: migrate sysconf tests from system/extras to bionic/tests"
Merge "Add getaddrinfo(3) tests for NULL arguments."
Merge "Remove remaining bionic support for TARGET_CPU_SMP being false."
Remove remaining bionic support for TARGET_CPU_SMP being false.
Change-Id: I02a0a1c0ae55ccb5c45d17fb99a09c374d71def4
Change-Id: I02a0a1c0ae55ccb5c45d17fb99a09c374d71def4
Add getaddrinfo(3) tests for NULL arguments.
According to https://github.com/ukanth/afwall/pull/213 some OEMs have
shipped a getaddrinfo(3) that crashes given NULL hostnames.
Change-Id: I9cea5fdd68546b7c64cf47e10e2b2b4d672b69d0
According to https://github.com/ukanth/afwall/pull/213 some OEMs have
shipped a getaddrinfo(3) that crashes given NULL hostnames.
Change-Id: I9cea5fdd68546b7c64cf47e10e2b2b4d672b69d0
Merge "Allow asan for glibc tests."
Allow asan for glibc tests.
SANITIZE_HOST will break if we don't allow ASAN.
Change-Id: I0beed82b058db391f633e0ea1098f140497c65d4
SANITIZE_HOST will break if we don't allow ASAN.
Change-Id: I0beed82b058db391f633e0ea1098f140497c65d4
libc: Fix mktime returns an uncorrect time in empty TZ case
The mktime API returned an uncorrect time when TZ is set as empty.
A timezone UTC/GMT+0 should be implied in the empty case. However
mktime keeps previous information about timezone. If mktime was called
with a timezone which has DST before, the "defaulttype" member of
"state" structure wouldn't be 0. Then it would be used next time,
even though UTC/GMT+0 doesn't have DST.
Added initialization of the "defaulttype" in the empty TZ case.
Change-Id: Ic480c63c548c05444134e0aefb30a7b380e3f40b
The mktime API returned an uncorrect time when TZ is set as empty.
A timezone UTC/GMT+0 should be implied in the empty case. However
mktime keeps previous information about timezone. If mktime was called
with a timezone which has DST before, the "defaulttype" member of
"state" structure wouldn't be 0. Then it would be used next time,
even though UTC/GMT+0 doesn't have DST.
Added initialization of the "defaulttype" in the empty TZ case.
Change-Id: Ic480c63c548c05444134e0aefb30a7b380e3f40b
bionic/test: migrate sysconf tests from system/extras to bionic/tests
The old test are implemented in file:
system/extras/tests/bionic/libc/other/test_sysconf.c
This change is to migrate them to bionic/tests with the gtest format.
and since the sysconf is defined in unistd.h, will put the test under
bionic/tests/unistd_test.cpp file as unistd.syscon test
Change-Id: Ie519147c1c86a6c4cefa8c88b18bf58bdfbffbdb
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
The old test are implemented in file:
system/extras/tests/bionic/libc/other/test_sysconf.c
This change is to migrate them to bionic/tests with the gtest format.
and since the sysconf is defined in unistd.h, will put the test under
bionic/tests/unistd_test.cpp file as unistd.syscon test
Change-Id: Ie519147c1c86a6c4cefa8c88b18bf58bdfbffbdb
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Merge "Add functions in sysinfo.h."
Merge "Increase support of pathconf options."
Increase support of pathconf options.
Bug: 18206366
Change-Id: Ie770e49f5af3631eb9fbd2cd5174edf004c81e00
Bug: 18206366
Change-Id: Ie770e49f5af3631eb9fbd2cd5174edf004c81e00
Merge "sysconf(3) returns long."
sysconf(3) returns long.
On LP32, this makes no difference. Not an ABI change.
On LP64, results are going to be in %rax or x0 whether they're 32- or 64-bit,
and the only difference is going to be whether the top bits are clobbered.
Bug: 18390956
Change-Id: I0bd4496231bdded34c1fa03e895021ac0df7f8e1
On LP32, this makes no difference. Not an ABI change.
On LP64, results are going to be in %rax or x0 whether they're 32- or 64-bit,
and the only difference is going to be whether the top bits are clobbered.
Bug: 18390956
Change-Id: I0bd4496231bdded34c1fa03e895021ac0df7f8e1
Merge "Add non-macro stdin/stdout/stderr too."
Add non-macro stdin/stdout/stderr too.
Various C and C++ standards explicitly say that stdin/stdout/stderr
should be macros, but glibc makes them global variables too. This
means it's possible to write code that uses those names as locals,
but that code (toybox being an example) won't build on bionic.
If we'd done this earlier, we could have hidden __sF for LP64, but
it's too late now.
Change-Id: I90cf8c73f52b66e1760b8fa2e135b9f9f9651230
Various C and C++ standards explicitly say that stdin/stdout/stderr
should be macros, but glibc makes them global variables too. This
means it's possible to write code that uses those names as locals,
but that code (toybox being an example) won't build on bionic.
If we'd done this earlier, we could have hidden __sF for LP64, but
it's too late now.
Change-Id: I90cf8c73f52b66e1760b8fa2e135b9f9f9651230
Merge "Fix host build for arm/arm64"