As glibc/netbsd don't protect access to thread struct members by a global
lock, we don't want to do it either. This change reduces the
responsibility of g_thread_list_lock to only protect g_thread_list.
Bug: 19636317
Change-Id: I897890710653dac165d8fa4452c7ecf74abdbf2b
aligned attribute can only control compiler's behavior, but we
are manually allocating pthread_internal_t. So we need to make
sure of alignment manually.
Change-Id: Iea4c46eadf10dfd15dc955c5f41cf6063cfd8536
The errors are introduced in "Make pthread join_state not protected by g_thread_list_lock".
Bug: 19636317
Change-Id: I58ae9711da94bfbac809abfd81311eeb70301a4b
This is currently set in init.rc, but I plan on making init
set PATH to _PATH_DEFPATH and removing the line from init.rc...
Bug: 19564110
Change-Id: Ifa7226a3a5a90d141a788d7d6b1ae86245674218
Bionic's getauxval(...) implementation returns zero when entries are
missing. Zero can be a valid value, so there is no unambiguous way of
detecting an error. Since glibc 2.19, errno is set to ENOENT when an
entry is missing to make it possible to detect this. Bionic should match
this behavior as code in the Linux ecosystem will start relying on it to
check for the presence of newly added entries.
Change-Id: Ic1efe29bc45fc87489274c96c4d2193f3a7b8854
Signed-off-by: Daniel Micay <danielmicay@gmail.com>
1. Move the representation of thread join_state from pthread.attr.flag
to pthread.join_state. This clarifies thread state change.
2. Use atomic operations for pthread.join_state. So we don't need to
protect it by g_thread_list_lock. g_thread_list_lock will be reduced
to only protect g_thread_list or even removed in further changes.
Bug: 19636317
Change-Id: I31fb143a7c69508c7287307dd3b0776993ec0f43
Make this change because I think it is more reasonable to check stack info
in pthread_getattr_np. I believe pthread_attr_t is not tied with any thread,
and can't have a flag saying who using it is the main thread.
This change also helps refactor of g_thread_list_lock.
Bug: 19636317
Change-Id: Iedbb85a391ac3e1849dd036d01445dac4bc63db9
/dev/mem (and /dev/kmem) are not enabled in the kernels, and selinux
prevents access and makes it a rule compilation error to enable
access. No code uses the _PATH_MEM macro. Remove definition to
suppress future usage.
Bug: 19549480
Change-Id: Ie0fb0f53d43349f4fe227068e4bf8a768f620d60
The kernel system call faccessat() does not have any flags arguments,
so passing flags to the kernel is currently ignored.
Fix the kernel system call so that no flags argument is passed in.
Ensure that we don't support AT_SYMLINK_NOFOLLOW. This non-POSIX
(http://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html)
flag is a glibc extension, and has non-intuitive, error prone behavior.
For example, consider the following code:
symlink("foo.is.dangling", "foo");
if (faccessat(AT_FDCWD, "foo", R_OK, AT_SYMLINK_NOFOLLOW) == 0) {
int fd = openat(AT_FDCWD, "foo", O_RDONLY | O_NOFOLLOW);
}
The faccessat() call in glibc will return true, but an attempt to
open the dangling symlink will end up failing. GLIBC documents this
as returning the access mode of the symlink itself, which will
always return true for any symlink on Linux.
Some further discussions of this are at:
* http://lists.landley.net/pipermail/toybox-landley.net/2014-September/003617.html
* http://permalink.gmane.org/gmane.linux.lib.musl.general/6952
AT_SYMLINK_NOFOLLOW seems broken by design. I suspect this is why this
function was never added to POSIX. (note that "access" is pretty much
broken by design too, since it introduces a race condition between
check and action). We shouldn't support this until it's clearly
documented by POSIX or we can have it produce intuitive results.
Don't support AT_EACCESS for now. Implementing it is complicated, and
pretty much useless on Android, since we don't have setuid binaries.
See http://git.musl-libc.org/cgit/musl/commit/?id=0a05eace163cee9b08571d2ff9d90f5e82d9c228
for how an implementation might look.
Bug: 18867827
Change-Id: I25b86c5020f3152ffa3ac3047f6c4152908d0e04
Build was broken by:
https://android-review.googlesource.com/133834
Use <unistd.h> to get syscall().
Remove <asm/unistd.h>, it gets included through <sys/syscall.h>.
Change-Id: Id762f6dea5f9538c19b79cdd46deda978efd50fe
We still have issues with clang coverage in static libraries, so we
need to make sure we follow suit with the rest of libc for now.
Bug: 17574078
Change-Id: I2ab58a84b1caa0d8d08415d240c35adec5b1e150
I still don't think we can make stdio's fseeko and ftello work, but we can
have everything else, and very few programs use fseeko/ftello (and they can
just refrain from using _FILE_OFFSET_BITS and be no worse off than they are
today).
Bug: 11865851
Change-Id: Ic3cb409aae6713f4b345de954bcc4241fcd969ec
The replacement new failures present in newer versions are present
here as well, with the following new issues:
XPASS std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long_double.pass.cpp
This is from the -NaN formatting fix in bionic. We previously had this
wrong, and the upstream test is also wrong. There's currently an XFAIL
for Android in this test because I haven't fixed the upstream test
yet. After that is done, I'll need to teach the test runner how to
XFAIL older Android versions...
FAIL std/localization/locale.categories/category.ctype/facet.ctype.special/facet.ctype.char.dtor/dtor.pass.cpp
dtor.pass.cpp:39: int main(): assertion "globalMemCounter.checkDeleteArrayCalledEq(1)" failed
Haven't investigated this one yet. http://b/19412688
Note that this also needs the libgcc link ordering to be fixed in the
build system, as we'll otherwise depend on libgcc symbols from libc
that may or may not have been there.
The build fix can't be submitted because the proper link order causes
the libgcc unwinder to be used instead of the EHABI one:
http://b/18471342
Bug: 18471532
Change-Id: Icf560485a9b8f5ebbe01e4458703e62ec94df5e1
Now passes all libc++ tests for these targets, with the exception of
the usual failing replacement new tests since libc uses new/delete for
things. I don't know if we can ever really fix these.
Bug: 18471532
Change-Id: Ibc0a15f26b0e4613249b5e15ecf3cf80e523467c
clang don't support warning attribute. Replacing warning attriubte with
deprecated attribute can achieve the same behavior whether compiled by
gcc or clang.
Bug: 19340053
Change-Id: I064432b81cf55212458edbc749eb72dc15a810fb
Time Zone Data v. 2015a (Released 2015-01-29)
http://www.iana.org/time-zones/repository/releases/tzdata2015a.tar.gz
Information from NEWS:
Release 2015a - 2015-01-29 22:35:20 -0800
Changes affecting future time stamps
The Mexican state of Quintana Roo, represented by America/Cancun,
will shift from Central Time with DST to Eastern Time without DST
on 2015-02-01 at 02:00. (Thanks to Steffen Thorsen and Gwillim Law.)
Chile will not change clocks in April or thereafter; its new standard time
will be its old daylight saving time. This affects America/Santiago,
Pacific/Easter, and Antarctica/Palmer. (Thanks to Juan Correa.)
New leap second 2015-06-30 23:59:60 UTC as per IERS Bulletin C 49.
(Thanks to Tim Parenti.)
Changes affecting past time stamps
Iceland observed DST in 1919 and 1921, and its 1939 fallback
transition was Oct. 29, not Nov. 29. Remove incorrect data from
Shanks about time in Iceland between 1837 and 1908.
Some more zones have been turned into links, when they differed
from existing zones only for older time stamps. As usual,
these changes affect UTC offsets in pre-1970 time stamps only.
Their old contents have been moved to the 'backzone' file.
The affected zones are: Asia/Aden, Asia/Bahrain, Asia/Kuwait,
and Asia/Muscat.
Bug: 19212588
(cherry-picked from commit 700eb048fb)
Change-Id: I23d94982f634889ab9dcef28cf4a8853224bfd9c
The overflow's actually in the generic C implementation of memchr.
While I'm here, let's switch our generic memrchr to the OpenBSD version too.
Bug: https://code.google.com/p/android/issues/detail?id=147048
Change-Id: I296ae06a1ee196d2c77c95a22f11ee4d658962da
The .note.android.ident section is only used by GDB, which doesn't
care what section type the section is, but it would be convenient
for readelf -n to be able to find the section too.
The old way of getting the .note.android.ident section to be of type
SH_NOTE involved compiling from .c to .s using gcc, running sed to
change progbits to note, and then compiling from .s to .o using gcc.
Since crtbrand.c only contains a section containing data, a
crtbrand.S can be checked in that will compile on all platforms,
avoiding the need for sed.
Also add crtbrand.o to crtbegin_so.o so that libraries also get
the note, and to the crt workaround in arm libc.so.
Change-Id: Ica71942a6af4553b56978ceaa288b3f4c15ebfa2
crtbrand.c was compiled to a .s file, run through a sed script
to translate a %progbits to %note, and the compiled to .o.
However, when the sed command was copied from the original source
it was not updated to use the new name of the section (.note.ABI-tag
to .note.android.ident), so it didn't modify the file. Since the
section has been generated with type %progbits instead of %note for
two years, just delete the whole sed step.
Change-Id: Id78582e9b43b628afec4eed22a088283132f0742
Include full 16-byte Mips sigset_t signal mask within jump buffer.
Call sigprocmask instead of sigblockmask/sigsetmask to get/set full signal mask.
Include sigsetjmp's savesigs arg inside jmp_buf, instead of following it.
Reserve room for future extensions.
Preserve historically-large mips32 _JBLEN size.
Eliminate redundancy: code setjmp and _setjmp as tail calls into sigsetjmp,
and make longjmp and _longjmp aliases of siglongjmp.
Change-Id: Ie79137cf059228c1a51344ebb20d3a9a40b4a252
* commit '427d438dd44bb79dad87d51ad60593872391e7a7':
Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
Fix typo in cpu variant makefile depenendency for arm64
Remove libc_static_common_src_files
Share LP32 makefile settings between arches
* changes:
Use LOCAL_LDFLAGS_64 instead of enumerating 64-bit architectures
Fix typo in cpu variant makefile depenendency for arm64
Remove libc_static_common_src_files
Share LP32 makefile settings between arches
libc_static_common_src_files is never set after
c3f114037d, remove the remaining
references to it.
Change-Id: I66364a5c1b031ad69d608f6f44244049192944f6
Add <var>_32 to patch-up-arch-specific-flags, and move the LP32
cruft varaibles from the 32-bit arch specific makefiles into the
top level Android.mk.
Change-Id: Id3fcf6805d4af048c2524c94b1295416ebe7d057