Commit graph

18916 commits

Author SHA1 Message Date
Treehugger Robot
b08fde95cb Merge "Fix error case to print newlines properly." 2016-11-09 00:33:12 +00:00
Christopher Ferris
4dd2785f05 Fix error case to print newlines properly.
Bug: 32640542

Test: Built and ran on a failing device.
Change-Id: I81a578af7608c741819062bd54aa8e348a621b83
2016-11-08 14:05:18 -08:00
Dimitry Ivanov
8bfaac0f8a Merge "Eliminate deadlock in forked child due to delayed resetting mutex lock" 2016-11-08 20:59:42 +00:00
Elliott Hughes
bfc6ce6424 Merge "Remove bogus OPEN_MAX and CHILD_MAX constants." 2016-11-08 01:05:48 +00:00
Treehugger Robot
59a3439fe8 Merge "Add legacy inlines for fenv APIs." 2016-11-07 23:51:41 +00:00
Treehugger Robot
15ae549658 Merge "Show amount of parallelism in gtest output." 2016-11-07 22:48:49 +00:00
Elliott Hughes
ff5f17bc8a Remove bogus OPEN_MAX and CHILD_MAX constants.
These are BSD-isms that don't make sense on Linux but do lead people astray.

Bug: http://b/32678775
Test: builds & boots
Change-Id: If6d3636f5f8d1b392b08c997dba2afde61b31fb6
2016-11-07 14:03:00 -08:00
Dan Albert
75097b1220 Add legacy inlines for fenv APIs.
Test: make native
      Copied into the NDK and ran ndk/checkbuild.py
Bug: None

Change-Id: I3d1e9317952ad23145a1f5221e347a16ebad4b0d
2016-11-07 13:12:38 -08:00
Treehugger Robot
2560a2703d Merge changes I660ddce6,Ic58d0481,I5d45aa72
* changes:
  Mark LIBC_DEPRECATED as platform-only.
  Remove _ZTV9type_info from the version script.
  Run genversion-scripts.py.
2016-11-07 19:12:38 +00:00
Christopher Ferris
9957485378 Merge "Fix cortex-a53 inclusion of files." 2016-11-07 16:42:55 +00:00
Elliott Hughes
a3ab8ebedd Merge "Fix format macros for fast16 and fast32 int types." 2016-11-07 16:33:35 +00:00
Christopher Ferris
95780f2b42 Merge "Make prctl test check maps." 2016-11-07 16:06:03 +00:00
Neil Fuller
275659a0fd Merge "Update timezone data to 2016i." 2016-11-07 11:11:13 +00:00
Christopher Ferris
5bde25f61a Fix cortex-a53 inclusion of files.
I accidentally broken the cortex-a53 because it directly includes files
from cortex-a15. Rather than revert that part, just copy over the files
that are needed directly so we don't run into this in the future.

Test: Built the aosp_angler-userdebug target using cortex-a53 as the
Test: arm target. Then built the bionic unit tests and ran them on
Test: an angler.

Change-Id: Id89e240b31f94e99f5076e1de973a9344486ec35
2016-11-06 23:36:32 -08:00
Christopher Ferris
f1649d92f7 Make prctl test check maps.
It turns out that sometimes this kernel bug can be present but not
trigger a crash. Modify the test to check for overlapping maps instead.

Bug: 32640542

Test: Verified that this fails on a device without the kernel patch
Test: (both bionic-unit-tests32 and CtsBionicTestCases32). Verified
Test: this passes on an angler.

Change-Id: Ia3fae3ee3d01f33d8414c1796fc3e942d5b56ec8
2016-11-06 23:25:34 -08:00
Mingwei Shi
f6a21bfac5 Eliminate deadlock in forked child due to delayed resetting mutex lock
For some program implementation, the pattern like below, calling 
pthread_atfork to register atfork interfaces.

    pthread_atfork(&atfork_prepare, &atfork_parent, &atfork_child);

When the program is expected to reopen the shared library's handle 
inherited from parent in child process. Maybe, dlclose is called in 
atfork_child to release the shared library handle before reopen it. 
Then, dlclose will indrectly call _cxa_finalize and finaly call 
__unregister_atfork when dso is not NULL.

    atfork_child() -> dlclose() -> __on_dlclose() 
    	-> __cxa_finalize() -> __unregister_atfork(dso)

In __unregister_atfork, firstly, it try to hold the g_atfork_list_mutex 
lock to operate the g_atfork_list. Due to the registered atfork_child is
executed before resetting g_atfork_list_mutex lock in child, the child 
process will be blocked here because of deadlock.

Test: bionic-unit-tests32 --gtest_filter=pthread.pthread_atfork_child_with_dlclose 
without the fixing, the test will be timeout.

Change-Id: I35d3001682c836e0955d6d681bc5f9297fad0c7b
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
Signed-off-by: Chao Xie <chao.xie@intel.com>
2016-11-07 03:32:57 +00:00
Treehugger Robot
147fdb4724 Merge "Clean up update_headers.sh." 2016-11-05 20:09:12 +00:00
Treehugger Robot
f41032a3e2 Merge "Set __get_thread()->tid as part of clone()." 2016-11-05 01:24:14 +00:00
Dan Albert
60dc6b2840 Mark LIBC_DEPRECATED as platform-only.
These symbols should not be exposed in the NDK.

Test: make native
Bug: None
Change-Id: I660ddce6d67bfdac029e31ef8dde2985fd4b1de5
2016-11-04 16:51:45 -07:00
Dan Albert
57e094f30a Remove _ZTV9type_info from the version script.
We broke this ABI in L:
https://android-review.googlesource.com/c/95071/.

This ABI break is now in over half of all devices, so it's more
correct to not have it than it is to have it. It's also worth noting
that this was only ever in ARM and MIPS; it was never in x86.

Test: make native
Bug: None
Change-Id: Ic58d048191f72d58fe72a2691bebbbfeda14bdf1
2016-11-04 16:51:45 -07:00
Dan Albert
832ccc2667 Run genversion-scripts.py.
I forgot to run this after adding NDK info to libstdc++.

Test: make native
Bug: None
Change-Id: I5d45aa7207b9eb548a233442aa0e3ab77d98baeb
2016-11-04 16:29:16 -07:00
Treehugger Robot
bf67936b4b Merge changes I9d050e54,Ic487036a
* changes:
  versioner: allow static inlines that don't conflict.
  versioner: fix output.
2016-11-04 23:06:55 +00:00
Robert Sesek
e462117087 Set __get_thread()->tid as part of clone().
This was previously done only in fork() and pthread_create(), but this left raw
clone() with an invalid cached tid. Since the tid is used for pthread routines,
this led to unstable behavior after clone().

Test: ltp clone01 (see bug for more)
Test: mmma bionic/tests
Test: bionic-unit-tests-static --gtest_filter=*fork*:*clone*

Bug: 32612735
Bug: 32305649
Change-Id: I30eae5a8024b4c5da65476fcadfe14c6db35bb79
2016-11-04 16:57:20 -04:00
Josh Gao
1a176de2f1 versioner: allow static inlines that don't conflict.
Bug: http://b/32664285
Test: python run_test.py
Change-Id: I9d050e545390eccd82661325c0ec58055f5f28a3
2016-11-04 13:16:29 -07:00
Josh Gao
a00e672361 versioner: fix output.
Bug: http://b/32664285
Test: python run_test.py
Change-Id: Ic487036a17cc6778493e316146e54ead8ce3e65b
2016-11-04 13:16:16 -07:00
Dan Albert
b89b7a5022 Clean up update_headers.sh.
Clean up some output, check for errors from the versioner.

Test: tools/update_headers.sh
Bug: None
Change-Id: Ib398b534a9a8ee6dc6a2b4d90747f628aa911bab
2016-11-04 11:41:14 -07:00
Neil Fuller
4c015e209d Update timezone data to 2016i.
IANA changes:

  Briefly: Cyprus split into two time zones on 2016-10-30, and Tonga
  reintroduces DST on 2016-11-06.

  Changes to future time stamps

    Pacific/Tongatapu begins DST on 2016-11-06 at 02:00, ending on
    2017-01-15 at 03:00.  Assume future observances in Tonga will be
    from the first Sunday in November through the third Sunday in
    January, like Fiji.  (Thanks to Pulu ʻAnau.)  Switch to numeric
    time zone abbreviations for this zone.

  Changes to past and future time stamps

    Northern Cyprus is now +03 year round, causing a split in Cyprus
    time zones starting 2016-10-30 at 04:00.  This creates a zone
    Asia/Famagusta.  (Thanks to Even Scharning and Matt Johnson.)

    Antarctica/Casey switched from +08 to +11 on 2016-10-22.
    (Thanks to Steffen Thorsen.)

  Changes to past time stamps

    Several corrections were made for pre-1975 time stamps in Italy.
    These affect Europe/Malta, Europe/Rome, Europe/San_Marino, and
    Europe/Vatican.

    First, the 1893-11-01 00:00 transition in Italy used the new UT
    offset (+01), not the old (+00:49:56).  (Thanks to Michael
    Deckers.)

    Second, rules for daylight saving in Italy were changed to agree
    with Italy's National Institute of Metrological Research (INRiM)
    except for 1944, as follows (thanks to Pierpaolo Bernardi, Brian
    Inglis, and Michael Deckers):

      The 1916-06-03 transition was at 24:00, not 00:00.

      The 1916-10-01, 1919-10-05, and 1920-09-19 transitions were at
      00:00, not 01:00.

      The 1917-09-30 and 1918-10-06 transitions were at 24:00, not
      01:00.

      The 1944-09-17 transition was at 03:00, not 01:00.  This
      particular change is taken from Italian law as INRiM's table,
      (which says 02:00) appears to have a typo here.  Also, keep the
      1944-04-03 transition for Europe/Rome, as Rome was controlled by
      Germany then.

      The 1967-1970 and 1972-1974 fallback transitions were at 01:00,
      not 00:00.

Bug: 32629043
Test: CtsIcuTestCases / CtsLibcoreTestCases / CtsBionicTestCases
Change-Id: Ica473348c063d2d0372b30ce6d184742db042c05
2016-11-04 16:23:47 +00:00
Christopher Ferris
aea8407ad5 Merge "Small cleanup of cortex-a15 code." 2016-11-03 22:40:16 +00:00
Treehugger Robot
42eb0b2555 Merge changes I751520a1,I5762e815
* changes:
  Add legacy inline for wait4.
  Revert "Add legacy inlines for locale aware APIs."
2016-11-02 19:56:10 +00:00
Treehugger Robot
654287fd73 Merge "Copy the NOTICE file when updating headers." 2016-11-02 19:48:43 +00:00
Christopher Ferris
fe1af1a64b Small cleanup of cortex-a15 code.
Remove new version of the cortex-a15 that caused a regression. We are never
going to revisit that code, and it is only confusing things.

Also remove the setting of MEMCPY_BASE and use the correct include
directly.

Test: Compiled angler with 32 bit arch as cortex-a15. Ran 32 bit bionic
Test: unit tests on angler.

Change-Id: I9372c01758fd7a596849c87b1a3f805bb477c94f
2016-11-01 14:28:22 -07:00
Dan Albert
e749abe9ab Add legacy inline for wait4.
This wasn't added to Android until android-18. Note that the reason
I'm adding an inline here even though I just reverted a bunch of
inlines in the previous commit is because this was an inline in the
legacy NDK headers. If it was in the old headers, it needs to be in
the unified headers. If it wasn't, it needs to be in
libandroid_support.

Test: ./tools/update_headers.py && make ndk && make native
      # Copied into working directory for unified headers NDK work.
      ndk/checkbuild.py
      ndk/run_tests.py --force-unified-headers
Bug: None

Change-Id: I751520a1df34b3edb5c59b4bd47170c4634a1883
2016-10-31 20:20:25 -07:00
Dan Albert
a3ce418ca6 Revert "Add legacy inlines for locale aware APIs."
We can't really add these to the unified headers yet since we're
still using the old headers as well, and libandroid_support needs to
work with both. These functions are already defined in
libandroid_support, so when using unified headers we'll get duplicate
definitions.

This was only going to be a temporary solution anyway. Instead we'll
just rely on libandroid_support (and eventually its rewrite) to handle
these.

This reverts commit 6576a3749b.

Test: ./tools/update_headers.py && make ndk && make native
      # Copied into working directory for unified headers NDK work.
      ndk/checkbuild.py
      ndk/run_tests.py --force-unified-headers
Bug: None

Change-Id: I5762e815e2030c89d7f2540df08dd67b6c2d10a5
2016-10-31 16:47:22 -07:00
Dan Albert
ae50e9d85c Copy the NOTICE file when updating headers.
Test: ./update_headers.sh
Bug: None
Change-Id: Ibde1e6d7ef1750d8369b65b3125b55023efb5b2a
2016-10-31 16:18:29 -07:00
Treehugger Robot
8c22ff76e2 Merge "Fix gettid() after clone()." 2016-10-29 02:09:56 +00:00
Treehugger Robot
9b908c8e36 Merge "Replace .align with .balign for clarity" 2016-10-28 17:23:49 +00:00
Elliott Hughes
48de71e3cc Show amount of parallelism in gtest output.
Bug: http://b/19075519
Test: ran tests
Change-Id: Ia190f728cc28e2283636e9cfea927e525d6c10c8
2016-10-28 10:04:44 -07:00
Robert Sesek
a4edf7a57c Fix gettid() after clone().
The tid is cached in the pthread_internal_t and is properly re-set after fork()
and pthread_create(). But after a plain clone() the value is stale from the
parent.

Test: mmma bionic/tests
Test: bionic-unit-tests-static --gtest_filter=*fork*:*clone*
Test: m checkbuild tests
Test: angler boots

Bug: 32305649
Change-Id: I026d416d1537484cd3e05c8493a35e5ed2acc8ed
2016-10-28 12:14:23 -04:00
Treehugger Robot
b1d98da378 Merge "Use ENTRY_PRIVATE in __bionic_clone assembler." 2016-10-27 23:07:28 +00:00
Dimitry Ivanov
e6ee960aef Replace .align with .balign for clarity
Test: run bionic-unit-tests
Change-Id: Icb43cc47e41d58fe3cb71986e05b3134022f895c
2016-10-27 05:11:56 -07:00
Xiaolei Yu
eb596533e3 Fix format macros for fast16 and fast32 int types.
Also change original format test to cover all cases.

Test: bionic unit tests
Change-Id: I2995145562c02918e0b596c008e63459912447ab
2016-10-26 17:52:38 -07:00
Elliott Hughes
beb8796624 Use ENTRY_PRIVATE in __bionic_clone assembler.
Bug: N/A
Test: bionic tests
Change-Id: Ic651d628be009487a36d0b2e5bcf900b981b1ef9
2016-10-26 17:01:58 -07:00
Pirama Arumuga Nainar
7409b9cfed Merge "Make versioner build with LLVM r275480" 2016-10-26 17:35:52 +00:00
Elliott Hughes
689ba18e11 Merge "_FILE_OFFSET_BITS=64's posix_fallocate should be posix_fallocate64." 2016-10-26 15:33:12 +00:00
Elliott Hughes
9bf2497c4a _FILE_OFFSET_BITS=64's posix_fallocate should be posix_fallocate64.
Bug: found when reproducing http://b/32331571
Test: "toybox fallocate -l 3m /data/local/tmp/new" on LP32
Change-Id: I4ec5835813b9556d824a12ad650bdf55698ea539
2016-10-25 14:13:32 -07:00
Pirama Arumuga Nainar
079be165a6 Make versioner build with LLVM r275480
Bug: http://b/31320715

Test: tools/versioner/preupload.sh
Change-Id: Icdff19b214b2b26c60288e49d26a88f04df68ef0
2016-10-25 09:35:20 -07:00
Neil Fuller
268b3d8878 Merge "Update timezone data to 2016h." 2016-10-25 08:28:11 +00:00
Treehugger Robot
e0baade272 Merge "Don't scan .swp files for copyright headers." 2016-10-25 04:43:20 +00:00
Elliott Hughes
4da06c0d64 Don't scan .swp files for copyright headers.
These are binary files, so that's not a good idea.

Bug: N/A
Test: N/A
Change-Id: If5e98df4bbbbac8a15a953be043df7d05c2b409a
2016-10-24 17:34:42 -07:00
Treehugger Robot
5e6eb761fc Merge "The default locale "" should be a UTF-8 locale." 2016-10-25 00:33:43 +00:00