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 cc5f6543e3.
Change-Id: I68dca8e1e9b9edcce7eb84596e8db619e40e8052
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
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
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 bbb34f9536.
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
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
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
According to https://github.com/ukanth/afwall/pull/213 some OEMs have
shipped a getaddrinfo(3) that crashes given NULL hostnames.
Change-Id: I9cea5fdd68546b7c64cf47e10e2b2b4d672b69d0
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 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>