- 19 Nov, 2013 6 commits
-
-
Christopher Ferris authored
Bug: 10414953 Change-Id: I711718098b9f3cc0ba8277778df64557e9c7b2a0
-
Elliott Hughes authored
-
Elliott Hughes authored
strace wants this, for example. Change-Id: Icb4d64bde392abbc091fa3375a4fa19b2707b12c
-
Elliott Hughes authored
-
Elliott Hughes authored
The kernel now maintains the pthread_internal_t::tid field for us, and __clone was only used in one place so let's inline it so we don't have to leave such a dangerous function lying around. Also rename files to match their content and remove some useless #includes. Change-Id: I24299fb4a940e394de75f864ee36fdabbd9438f9
-
Narayan Kamath authored
-
- 18 Nov, 2013 7 commits
-
-
Elliott Hughes authored
-
Elliott Hughes authored
-
Elliott Hughes authored
Let the kernel keep pthread_internal_t::tid updated, including across forks and for the main thread. This then lets us fix pthread_join to only return after the thread has really exited. Also fix the thread attributes of the main thread so we don't unmap the main thread's stack (which is really owned by the dynamic linker and contains things like environment variables), which fixes crashes when joining with an exited main thread and also fixes problems reported publicly with accessing environment variables after the main thread exits (for which I've added a new unit test). In passing I also fixed a bug where if the clone(2) inside pthread_create(3) fails, we'd unmap the child's stack and TLS (which contains the mutex) and then try to unlock the mutex. Boom! It wasn't until after I'd uploaded the fix for this that I came across a new public bug reporting this exact failure. Bug: 8206355 Bug: 11693195 Bug: https://code.google.com/p/android/issues/detail?id=57421 Bug: https://code.google.com/p/android/issues/detail?id=62392 Change-Id: I2af9cf6e8ae510a67256ad93cad891794ed0580b
-
Pawit Pornkitprasan authored
As of 61e699a1, stdio clean up functions are no longer registered in atexit and must be called manually via __cleanup. The issue this fixes is some static binaries linked against bionic cannot output properly when piped or redirected because the buffer is not flushed before closing. This is done by pulling in exit.c (and other dependencies) from netbsd. Change-Id: I193e54a6d08900f291550029fe75ce76394d9e22
-
Christopher Ferris authored
-
Christopher Ferris authored
-
Narayan Kamath authored
Should be 1. Change-Id: I6cf723a419f51d3bda58286a538774b71276c7b5
-
- 15 Nov, 2013 8 commits
-
-
Christopher Ferris authored
Change-Id: Ia917af9336b63ed5a10147770a8110134cb274cb
-
Christopher Ferris authored
It turns out that when passing a closed file to getdelim or getline, the functions in glibc will properly return a failure, but errno might not be set. Skip the errno check except on bionic. Change-Id: I8d625f15303d4c2d42e8d28491ea8a368aea4d32
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: 8206355 Bug: 11693195 Change-Id: I35cc024d5b6ebd19d1d2e45610db185addaf45df
-
Christopher Ferris authored
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: 8206355 Bug: 11693195 Change-Id: I04aadbc36c87e1b7e33324b9a930a1e441fbfed6
-
Christopher Ferris authored
Create a few generic testing functions to allow any memory/string tests to be created. Add alignment tests for memcpy/memset/strcat/strcpy/strlen. Add an overread test for memcpy/strcat/strcpy/strlen. This test attempts to verify that the functions do not read past the end of their buffers (src buffer in the case of src/dst functions). Bug: 9797008 Change-Id: Ib3223ca1b99e729ae8229adc2d03f4dc3103d97c
-
- 14 Nov, 2013 2 commits
-
-
Elliott Hughes authored
-
Chris Dearman authored
Some MIPS kernels do not correctly restart interrupted system calls that have been invoked using the indirect syscall (NR_syscall). The simplest workaround is to handle the indirection in userland and then call the required system call directly. Change-Id: I8385399621529db9a52b463c96925f6decaaca30
-
- 13 Nov, 2013 6 commits
-
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: 11559337 Change-Id: I6352cac9c4ef425cb21e34d0299223711ec079af
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: 11669804 Change-Id: Idfa6527640c8d0c2cf3e5343bf7afe013e237545
-
Elliott Hughes authored
-
Elliott Hughes authored
Change-Id: Ic7d9735d46711af93c3a1747de7b2eb8cebea094
-
- 11 Nov, 2013 2 commits
-
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: https://code.google.com/p/android/issues/detail?id=61799 Change-Id: I84af68f8430a06e999297c2e57e06ecb45adf81e
-
- 08 Nov, 2013 6 commits
-
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: 11559337 Change-Id: I205974b1a26e4f85d0e11503afa80669195d211c
-
Elliott Hughes authored
-
Elliott Hughes authored
The kernel doesn't have an nlink_t; it just uses the equivalent of uint32_t. We already had a usable __nlink_t in the C library, so let's just define our nlink_t in terms of __nlink_t, which is what __nlink_t was meant for anyway. Note that our struct stat just follows the kernel, and doesn't refer to nlink_t anyway. Change-Id: I2a56e418e42404b1741b08c50554b03c11caebae
-
Elliott Hughes authored
-
Elliott Hughes authored
Bug: 11559337 Change-Id: I23b1a43e7bfa8fa6f9df7e59d2e731a0ec52dafc
-
- 07 Nov, 2013 3 commits
-
-
Elliott Hughes authored
-
Elliott Hughes authored
<time.h> didn't need to copy the cruft from <signal.h>, and <signal.h> only needs the uid_t hack when it's not using uapi headers. pthread_exit.cpp should include what it uses. Change-Id: I836c36abe0f0a781d41fc425b249d1c7686bb124
-
Elliott Hughes authored
-