Commit graph

6085 commits

Author SHA1 Message Date
Yabin Cui
2587c6a2f0 Merge "Change on handling of SIGEV_THREAD timers." 2015-04-16 01:08:25 +00:00
Yabin Cui
95f1ee235a Change on handling of SIGEV_THREAD timers.
1. Don't prevent calling callback when SIGEV_THREAD timers are disarmed by timer_settime.
As in POSIX standard: The effect of disarming or resetting a timer with pending
expiration notifications is unspecified. And glibc didn't prevent in this situation, so I
think it is fine to remove the support.
2. Still prevent calling callback when SIGEV_THREAD timers are deleted by timer_delete.
As in POSIX standard: The disposition of pending signals for the deleted timer is unspecified.
However, glibc handles this (although that is not perfect). And some of our tests in
time_test.cpp depend on this feature as described in b/18039727. so I retain the support.
3. Fix some flaky test in time_test.cpp, and make "time*" test pass on bionic-unit-tests-glibcxx.

Bug: 18263854

Change-Id: I8ced184eacdbfcf433fd81b0c69c38824beb8ebc
2015-04-15 17:36:01 -07:00
Dmitriy Ivanov
66aa0b61f7 Hide emutls* symbols in libc.so
Also make thread_local in test static to avoid ld.bfd
 warning for arm64.

Change-Id: I09a3f2aa9b73a4fafa3f3bbc64ddc2a128ad50ee
2015-04-15 14:23:00 -07:00
Christopher Ferris
940d3122c9 Fix addition of extra arg to cfi_restore.
Change-Id: I8fdcc1ae3e91b69ccbcec756a89e1ccb4fa1be53
2015-04-14 17:02:31 -07:00
Christopher Ferris
a529efac4e Merge "Add missing cfi directives for x86 assembler." 2015-04-14 23:43:09 +00:00
Christopher Ferris
605ee81b06 Add missing cfi directives for x86 assembler.
Change-Id: I80d3e33a71bbaeab5f39b667ebe61e865fd54b80
2015-04-14 16:42:10 -07:00
Yabin Cui
8f3f04184a Merge "Prevent using static-allocated pthread keys before creation." 2015-04-14 20:35:08 +00:00
Yabin Cui
5ddbb3f936 Prevent using static-allocated pthread keys before creation.
Bug: 19993460

Change-Id: I244dea7f5df3c8384f88aa48d635348fafc9cbaf
2015-04-14 13:32:09 -07:00
Dmitriy Ivanov
9ce9bf5aec Merge "Add Elfxx_Ver* types" 2015-04-09 22:14:09 +00:00
Dmitriy Ivanov
c0e7dbb1db Add Elfxx_Ver* types
Bug: http://b/20139821
Change-Id: I7a367b08faa3bf5c005996c066cd35709f533265
2015-04-09 13:58:53 -07:00
Christopher Ferris
0a92ac8848 Merge "Use assembly memmove for all arm32 processors." 2015-04-09 17:41:58 +00:00
Yabin Cui
9f2c2f53d3 Merge "Provide writer preference option in rwlock." 2015-04-09 17:19:44 +00:00
Neil Fuller
aba687a09c Upgrade timezone data to 2015b
Changes affecting future time stamps

    Mongolia will start observing DST again this year, from the last
    Saturday in March at 02:00 to the last Saturday in September at 00:00.
    (Thanks to Ganbold Tsagaankhuu.)

    Palestine will start DST on March 28, not March 27.  Also,
    correct the fall 2014 transition from September 26 to October 24.
    Adjust future predictions accordingly.  (Thanks to Steffen Thorsen.)

  Changes affecting past time stamps

    The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a
    regression.  (Thanks to Stuart Bishop for reporting the problem.)

    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: America/Antigua, America/Cayman,
    Pacific/Midway, and Pacific/Saipan.

  Changes affecting time zone abbreviations

    Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD".
    (Thanks to Hank W.)

Bug: 19887183
Change-Id: I1b4bdc5ae5cf778908a77893d7f8db8a4117e1e1
2015-04-09 11:15:27 +01:00
Neil Fuller
694282b172 Merge "Update update-tzdata.py tool to generate ICU4J data jars" 2015-04-09 09:39:57 +00:00
Neil Fuller
4d3abcb033 Update update-tzdata.py tool to generate ICU4J data jars
The ICU4J changes are not necessary for use on Android (since
we use the ICU4C .dat file), but updating them ensures that
the .jars in sync with everything else and the jars are currently
required for host tests.

Change-Id: Ie56b31af87e8fbd27a6489af8287e4b6a7be6b8f
2015-04-09 09:38:31 +00:00
Christopher Ferris
41efc92e35 Use assembly memmove for all arm32 processors.
Bug: 15110993
Change-Id: Ia3dcd6b8c4032f8c72b6f2e628b635ce99667c09
2015-04-08 16:53:16 -07:00
Yabin Cui
76615dae93 Provide writer preference option in rwlock.
Previous implementation of rwlock contains four atomic variables, which
is hard to maintain and change. So I make following changes in this CL:

1. Add pending flags in rwlock.state, so we don't need to synchronize
between different atomic variables. Using compare_and_swap operations
on rwlock.state is enough for all state change.

2. Add pending_lock to protect readers/writers waiting and wake up
operations. As waiting/wakeup is not performance critical, using a
lock is easier to maintain.

3. Add writer preference option.

4. Add unit tests for rwlock.

Bug: 19109156

Change-Id: Idcaa58d695ea401d64445610b465ac5cff23ec7c
2015-04-08 13:11:13 -07:00
Dmitriy Ivanov
598493e725 Merge "Stop libc from cross-referencing unwind symbols" 2015-04-07 19:21:32 +00:00
Neil Fuller
957f6188fa Merge "Changes to re-enable overrides for tz data" 2015-04-07 12:55:07 +00:00
Dmitriy Ivanov
cd13b14e98 Stop libc from cross-referencing unwind symbols
This makes unwind symbols 'protected',
  which should prevent them from relocating
  against libc++.so/libcutls.so.

  This is temporary file and it is going
  to be removed once libc.so stops exporting
  them.

Bug: http://b/19958712
Change-Id: I96a765afe47e68d2e2ceb288870e63a25ca52081
2015-04-07 01:48:35 +00:00
Yabin Cui
4bd8f9637d Merge "Fix bug for recursive/errorcheck mutex on 32-bit devices." 2015-04-04 19:31:55 +00:00
Yabin Cui
f796985923 Fix bug for recursive/errorcheck mutex on 32-bit devices.
Bug: 19216648
Change-Id: I3b43b2d18d25b9bde352da1e35f9568133dec7cf
2015-04-03 19:01:17 -07:00
Elliott Hughes
dffd3c5838 Try again to fix clang build.
I got the condition the wrong way round in the previous change.

Bug: http://b/20065774
Change-Id: I218b224b37f5fb2f7c7ec2f9af27472b340c4b15
2015-04-03 13:37:18 -07:00
Elliott Hughes
0975a5d9d2 Fix clang build.
Apparently clang really doesn't want you to take the address of a builtin.
Since this is only a temporary hack, let's just shrug and accept that
clang-built volantis images won't work until we have new NVIDIA blobs.

Bug: http://b/20065774
Change-Id: I4c8e893b15a1af8f9c54d3f89bfef112b63d09b4
2015-04-03 13:10:04 -07:00
Dmitriy Ivanov
aea165cb03 Merge "Add ANDROID_DLEXT_FORCE_LOAD flag" 2015-04-03 19:45:24 +00:00
Elliott Hughes
76e1cbca75 Fix volantis boot.
NVIDIA binary blobs are assuming that __cache_clear, _Unwind_Backtrace,
and _Unwind_GetIP are all in some library that they link, but now we've
cleaned up this leakage, they're no longer getting it. Deliberately leak
the symbols from libc.so until we get new blobs.

Bug: http://b/20065774
Change-Id: I92ef07b2bce8d1ad719bf40dab41d745cd6904d4
2015-04-03 12:37:03 -07:00
Dmitriy Ivanov
9b82136b98 Add ANDROID_DLEXT_FORCE_LOAD flag
This flag allows to force loading of the library
  in the case when for some reason multiple ELF files
  share the same filename (because the already-loaded
  library has been removed and overwritten, for example).

Change-Id: I798d44409ee13d63eaa75d685e99c4d028d2b0c1
2015-04-03 10:50:48 -07:00
Elliott Hughes
d619d6ffb8 Merge "Remove _memset16 and _memset32 from mips/mips64 bionic." 2015-04-02 20:35:22 +00:00
Yabin Cui
00d1101cc1 Merge "Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices." 2015-04-02 20:27:40 +00:00
Elliott Hughes
b0cf9288cd Remove _memset16 and _memset32 from mips/mips64 bionic.
These should be in libcutils instead.

Change-Id: Ibbc94755e6da61bf9ce2c8f9a047a082bb9bce24
2015-04-02 10:34:58 -07:00
Yabin Cui
e69c24543d Refactor pthread_mutex to support 32-bit owner_tid on 64-bit devices.
Bug: 19216648
Change-Id: I765ecacc9036659c766f5d1f6600e1a65364199b
2015-04-01 21:12:22 -07:00
Dan Albert
d6bf3d5e19 Don't export new/delete from libc shared libraries.
This used to be handled by -fvisibility=hidden on libc_cxa, but that
was broken by the resolution of https://llvm.org/PR22419 (introduced
to Android in today's clang update).

Now we just use a version script that prevents these from being
re-exported from our shared libraries.

Change-Id: Ib290e1d0d7426e09ad17a91178162fff6dbdcfa9
2015-04-01 16:31:57 -07:00
Mark Salyzyn
8f41142cd6 Merge "stubs missing include for string.h" 2015-04-01 00:55:19 +00:00
Elliott Hughes
72035734af Merge "Make ThreadLocalBuffer a class rather than a macro." 2015-04-01 00:51:57 +00:00
Mark Salyzyn
56b2768176 stubs missing include for string.h
stubs.cpp gets string.h inherited from private/android_filesystem_config.h
it should not rely on this in the future. The intent is to move fs_config
function into libcutils and thus deprecate any need for string.h in this
include file.

Change-Id: I946ec1979ef5bbb34fbcb4a99bf2cd79280bb2a3
2015-03-31 16:58:35 -07:00
Christopher Ferris
e01d32f802 Upgrade kernel headers to 3.18.10.
Change-Id: Iff1f1c830780585990856a5114b559c61282dcd6
2015-03-31 14:57:48 -07:00
Elliott Hughes
6170693e28 Make ThreadLocalBuffer a class rather than a macro.
Bug: 19995392
Change-Id: I497c512648fbe66257da3fb3bcd5c9911f983705
2015-03-31 10:56:58 -07:00
Yabin Cui
ef11500301 Revert "Revert "add guard pages to the internal signal stacks""
This reverts commit a3125fd139.
And Fix the prctl() problem that cause system crash.

Change-Id: Icc8d12d848cfba881a7984ca2827fd81be41f9fd
2015-03-30 20:51:39 -07:00
Elliott Hughes
a3125fd139 Revert "add guard pages to the internal signal stacks"
This reverts commit 595752f623.

Change-Id: Iefa66e9049ca0424e53cd5fc320d161b93556dcb
2015-03-31 02:42:39 +00:00
Daniel Micay
595752f623 add guard pages to the internal signal stacks
Signal handlers tend to be lean, but can still overflow the (tiny)
stack.

Change-Id: Ia21c6453d92a9f8d1536ad01ff26a1a84c05f8fb
2015-03-30 17:13:20 -04:00
Dmitriy Ivanov
402d199450 Fix libstdc++.so hash-style.
Bug: 19059885
Bug: 19958712
Change-Id: I167457a54cc688d64912a50f5fb75e4e2f3e3937
2015-03-27 15:27:07 -07:00
Yabin Cui
8f3eb5a4e5 Merge "Revert "Cause Fatal error when invalid pthread_id is detected."" 2015-03-26 18:14:23 +00:00
Yabin Cui
220b99bdc1 Revert "Cause Fatal error when invalid pthread_id is detected."
Some code like in https://buganizer.corp.google.com/u/0/issues/19942911 need to change first.

This reverts commit 03324780aa.

Change-Id: I13ff1e5b3d0672bae9cde234ffba32fbbf33d338
2015-03-26 18:13:07 +00:00
Dmitriy Ivanov
f2d153f836 Merge "Initial implementation of __cxa_thread_atexit_impl" 2015-03-26 17:50:23 +00:00
Yabin Cui
377243b78c Remove PTHREAD_RECURSIVE_MUTEX_INITIALIZER and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER.
These macros are also not used in glibc. And we should use
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
and PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP instead.

Change-Id: I35195e2f499712dcde9305bbb93622d0f7ca874b
2015-03-25 21:02:36 -07:00
Dmitriy Ivanov
df79c330d8 Initial implementation of __cxa_thread_atexit_impl
This is initial implementations; does not yet handle
  dlclose - undefined behavior, needs linker support to
  handle it right.

Bug: 19800080
Bug: 16696563
Change-Id: I7a3e21ed7f7ec01e62ea1b7cb2ab253590ea0686
2015-03-25 18:07:59 -07:00
Yabin Cui
17393b06ba Hide internal of pthread_mutex_t.
Bug: 19249079
Change-Id: Iffb79c8d861b698d474f212dc80c638fc2cf1620
2015-03-25 17:54:17 -07:00
Yabin Cui
fa3dcecc0f Merge "Fix in error handling in pthread_create.cpp." 2015-03-26 00:26:59 +00:00
Yabin Cui
799cb35f45 Fix in error handling in pthread_create.cpp.
It is due to a previous change "Let g_thread_list_lock only protect g_thread_list".
We need to add the newly created thread to thread_list even if
__init_thread fails, so the thread can exit successfully.

Change-Id: I0332df11acfdd181350bcc092b12d90d679057a4
2015-03-25 16:18:21 -07:00
Yabin Cui
03324780aa Cause Fatal error when invalid pthread_id is detected.
This is a patch testing whether we can use abort() instead of
returning ESRCH for invalid pthread ids. It is an intermediate
step to remove g_thread_list/g_thread_list_lock.

Bug: 19636317
Change-Id: Idd8e4a346c7ce91e1be0c2ebcb78ce51c0d0a31d
2015-03-25 15:30:39 -07:00