OSDN Git Service

android-x86/bionic.git
7 years agoAdd cortex-a7 specific routines.
Christopher Ferris [Mon, 28 Nov 2016 19:09:49 +0000 (11:09 -0800)]
Add cortex-a7 specific routines.

Test: Changed angler target to use cortex-a7 and I compiled.
Test: Booted this version on angler and ran bionic-unit-tests.

Change-Id: Ice7f6ea38a2569582161a8e659d7877918c1a45a

7 years agoMerge "bionic: make NONBLOCK call to getrandom"
Treehugger Robot [Thu, 24 Nov 2016 04:23:01 +0000 (04:23 +0000)]
Merge "bionic: make NONBLOCK call to getrandom"

7 years agobionic: make NONBLOCK call to getrandom
Wei Wang [Wed, 23 Nov 2016 18:41:35 +0000 (10:41 -0800)]
bionic: make NONBLOCK call to getrandom

By default getrandom() blocks if the entropy pool has not yet been initialized.
This will be an issue when init was first executed in some kernels.

This CL makes a check of getrandom readyness, by adding the GRND_NONBLOCK flag.
In such case, getrandom() does not block returns -1 with errno set to EAGAIN.

Test: on M/S devices
Bug: 33059407
Change-Id: I2a2ba8372a5e1c336852ba2ab77cdaac03c90389

7 years agoMerge "Remove CLONE_NEWNS for gettid and getpid cache tests."
Yabin Cui [Wed, 23 Nov 2016 18:15:31 +0000 (18:15 +0000)]
Merge "Remove CLONE_NEWNS for gettid and getpid cache tests."

7 years agoRemove CLONE_NEWNS for gettid and getpid cache tests.
Yabin Cui [Wed, 23 Nov 2016 01:18:10 +0000 (17:18 -0800)]
Remove CLONE_NEWNS for gettid and getpid cache tests.

Using CLONE_NEWNS flag is not related to the tests, and it make
the tests unavailable in cts tests. So remove the flag.

Bug: http://b/33089743
Test: run CtsBionicTestCases --gtest_filter=unistd*.
Change-Id: I4bda39c6a0c41c9973d275202a3a7f7a1e9bbba3

7 years agoMerge "Log call to elf-constructors"
Treehugger Robot [Tue, 22 Nov 2016 01:27:23 +0000 (01:27 +0000)]
Merge "Log call to elf-constructors"

7 years agoMerge "versioner: extract strict warnings out of -v into its own flag."
Josh Gao [Tue, 22 Nov 2016 00:51:14 +0000 (00:51 +0000)]
Merge "versioner: extract strict warnings out of -v into its own flag."

7 years agoMerge "versioner: use a single work queue."
Josh Gao [Tue, 22 Nov 2016 00:50:58 +0000 (00:50 +0000)]
Merge "versioner: use a single work queue."

7 years agoLog call to elf-constructors
Dimitry Ivanov [Mon, 21 Nov 2016 18:44:35 +0000 (10:44 -0800)]
Log call to elf-constructors

Log call to constructors when dlopen logging is enabled.

Bug: http://b/29458203
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I0cd591bf147f8f910ae9def1ac4089ef44099aff

7 years agoMerge "Document more dynamic linker changes."
Treehugger Robot [Sat, 19 Nov 2016 00:49:38 +0000 (00:49 +0000)]
Merge "Document more dynamic linker changes."

7 years agoDocument more dynamic linker changes.
Elliott Hughes [Fri, 18 Nov 2016 20:28:01 +0000 (12:28 -0800)]
Document more dynamic linker changes.

Based on https://plus.google.com/+ElliottHughes/posts/dtguP8BWkc7?sfc=false.

Bug: http://b/33001640
Change-Id: I9efedaf1c17a38d4426f030dd252446e4dfbc1cb

7 years agoMerge "Enable malloc debug using environment variables"
Christopher Ferris [Fri, 18 Nov 2016 21:33:17 +0000 (21:33 +0000)]
Merge "Enable malloc debug using environment variables"

7 years agoMerge "Add note about pid_max to host test documentation."
Josh Gao [Fri, 18 Nov 2016 02:55:31 +0000 (02:55 +0000)]
Merge "Add note about pid_max to host test documentation."

7 years agoAdd note about pid_max to host test documentation.
Josh Gao [Fri, 18 Nov 2016 02:52:09 +0000 (18:52 -0800)]
Add note about pid_max to host test documentation.

Bug: none
Test: none
Change-Id: I3e446744076131329201543fa29b71fc4f843728

7 years agoversioner: extract strict warnings out of -v into its own flag.
Josh Gao [Thu, 10 Nov 2016 02:22:44 +0000 (18:22 -0800)]
versioner: extract strict warnings out of -v into its own flag.

Bug: None
Test: versioner -v; versioner -s
Change-Id: I8f6ac7064c6f05de0811677f7fcfce929a2568c1

7 years agoversioner: use a single work queue.
Josh Gao [Thu, 10 Nov 2016 02:01:41 +0000 (18:01 -0800)]
versioner: use a single work queue.

Previously, each thread was assigned a fixed list of work, and the main
thread would block until every thread was finished, leading to most
cores sitting idle for the last few hundred milliseconds while a few
particularly long running threads would keep working. Use a single work
queue to evenly distribute load across the threads.

Bug: http://b/32748936
Test: python run_tests.py
Change-Id: I80e231ece3b95e2721a32f658905841b89a8dc3b

7 years agoMerge "versioner: ignore non-header files."
Treehugger Robot [Fri, 18 Nov 2016 02:04:24 +0000 (02:04 +0000)]
Merge "versioner: ignore non-header files."

7 years agoMerge "Improve dlerror_concurrent test"
Treehugger Robot [Fri, 18 Nov 2016 00:07:41 +0000 (00:07 +0000)]
Merge "Improve dlerror_concurrent test"

7 years agoImprove dlerror_concurrent test
Dimitry Ivanov [Thu, 17 Nov 2016 20:38:09 +0000 (12:38 -0800)]
Improve dlerror_concurrent test

Add a test to check if result is thread-local, not only buffer.

Test: run bionic-unit-tests
Change-Id: Ia95f88c0d76aa86f7f439836393abd67a57dd396

7 years agoEnable malloc debug using environment variables
Tamas Berghammer [Fri, 26 Aug 2016 14:54:59 +0000 (15:54 +0100)]
Enable malloc debug using environment variables

Previously malloc debug can be enabled only using global settings
accessible to the root user only. This CL adds a new option to enable
it using environment variables making it possible to use it with pure
native (shell) applications on production builds (from shell user) and
prepares it for using it from logwrapper on production devices.

Remove the old environment variable and property since they are not
necessary.

Test: Enable malloc debug using environment variable and verify
Test: that it only affects the commands launched from the shell.
Test: Enable malloc debug using the property variable and verify
Test: that it affects all commands.
Test: Run all unit tests in 32 bit and 64 bit.
Change-Id: Iecb75a3471552f619f196ad550c5f41fcd9ce8e5

7 years agoMerge "Fix iswlower/iswupper."
Christopher Ferris [Thu, 17 Nov 2016 20:06:05 +0000 (20:06 +0000)]
Merge "Fix iswlower/iswupper."

7 years agoMerge "Relax ELF header checks - warn for apps targeting pre-O"
Dimitry Ivanov [Thu, 17 Nov 2016 05:21:41 +0000 (05:21 +0000)]
Merge "Relax ELF header checks - warn for apps targeting pre-O"

7 years agoMerge "Remove unused includes/externals"
Treehugger Robot [Thu, 17 Nov 2016 02:48:41 +0000 (02:48 +0000)]
Merge "Remove unused includes/externals"

7 years agoRelax ELF header checks - warn for apps targeting pre-O
Dimitry Ivanov [Wed, 16 Nov 2016 20:29:37 +0000 (12:29 -0800)]
Relax ELF header checks - warn for apps targeting pre-O

Bug: http://b/32581440
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I2fe356c67eb9665c671758117679a29b207219e4

7 years agoMerge "Add and use constants for the Android API levels."
Treehugger Robot [Thu, 17 Nov 2016 02:37:37 +0000 (02:37 +0000)]
Merge "Add and use constants for the Android API levels."

7 years agoversioner: ignore non-header files.
Josh Gao [Thu, 17 Nov 2016 01:01:57 +0000 (17:01 -0800)]
versioner: ignore non-header files.

Don't try to compile non-headers (vim swap files, etc.) that happen to
be in the header directory.

Bug: none
Test: manually created a file in libc/include
Change-Id: I2c1647ec7174dc617898dc2f07c9a80a08b69c72

7 years agoAdd and use constants for the Android API levels.
Elliott Hughes [Wed, 16 Nov 2016 19:35:43 +0000 (11:35 -0800)]
Add and use constants for the Android API levels.

Test: bionic tests still pass
Change-Id: If1b619cfc9db1d3f5d91f14f2ace71058dca0c4a

7 years agoMerge "Add original prebuilt test libraries"
Dimitry Ivanov [Thu, 17 Nov 2016 00:52:40 +0000 (00:52 +0000)]
Merge "Add original prebuilt test libraries"

7 years agoRemove unused includes/externals
Dimitry Ivanov [Wed, 16 Nov 2016 23:23:37 +0000 (15:23 -0800)]
Remove unused includes/externals

Test: mm
Change-Id: I4b88602b7d0a18664cbeddfa9854e589c2886e1a

7 years agoFix iswlower/iswupper.
Elliott Hughes [Wed, 16 Nov 2016 23:19:08 +0000 (15:19 -0800)]
Fix iswlower/iswupper.

The previous conditions were just plain wrong.

Test: bionic tests
Change-Id: Ia6d98207b1ff98ea4c6f619912e4bcdb8a7fdd24

7 years agoAdd original prebuilt test libraries
Dimitry Ivanov [Wed, 16 Nov 2016 21:41:36 +0000 (13:41 -0800)]
Add original prebuilt test libraries

This is the library used to produce invalid prebuilt libraries
for loader tests.

Bug: http://b/30795430
Test: not necessary - these are added for reference
Change-Id: I06e681bf826e59a76da9b49d84d26dee34920d49

7 years agoMerge "Downgrade W+E load segments to a warning unless targeting O."
Elliott Hughes [Wed, 16 Nov 2016 19:04:17 +0000 (19:04 +0000)]
Merge "Downgrade W+E load segments to a warning unless targeting O."

7 years agoMerge "Fix uninitialized variable usage."
Christopher Ferris [Wed, 16 Nov 2016 18:59:02 +0000 (18:59 +0000)]
Merge "Fix uninitialized variable usage."

7 years agoFix uninitialized variable usage.
Christopher Ferris [Tue, 15 Nov 2016 22:04:16 +0000 (14:04 -0800)]
Fix uninitialized variable usage.

If the dladdr call fails, then info.dli_fname will be unitialized.
Make sure that this can't happen.

Bug: 32907235

Test: Enabled malloc debug on an angler and verified that function names
Test: still work.
Change-Id: I738e66d9f37bce07bc4c10f1f9bac11fbfdae2c7

7 years agoMerge "Fix deprecated range_x() calls."
Martijn Coenen [Wed, 16 Nov 2016 09:48:30 +0000 (09:48 +0000)]
Merge "Fix deprecated range_x() calls."

7 years agoMerge "Fix getrandom syscall checking"
Treehugger Robot [Wed, 16 Nov 2016 03:23:43 +0000 (03:23 +0000)]
Merge "Fix getrandom syscall checking"

7 years agoDowngrade W+E load segments to a warning unless targeting O.
Elliott Hughes [Wed, 16 Nov 2016 00:54:16 +0000 (16:54 -0800)]
Downgrade W+E load segments to a warning unless targeting O.

I don't think we're getting any value from more dupes of the same dodgy
middleware, and I worry that we're hiding other, more subtle, compatibility
issues behind this one.

Test: bionic tests
Change-Id: I556cf36eac96c90976bae32621d1c133bbb8fcc7

7 years agoFix getrandom syscall checking
Wei Wang [Wed, 16 Nov 2016 00:42:53 +0000 (16:42 -0800)]
Fix getrandom syscall checking

Test: angler
Bug: 32838381
(cherry-picked from commit 46289b4c0211fc48d8719b385a7e56d765510ebd)

Change-Id: I102ffa26d7f39a8d3572b31f04b66ae31a9e752c

7 years agoMerge "Don't pack relocations in libc.so"
Colin Cross [Tue, 15 Nov 2016 23:38:01 +0000 (23:38 +0000)]
Merge "Don't pack relocations in libc.so"

7 years agoDon't pack relocations in libc.so
Colin Cross [Tue, 15 Nov 2016 21:15:43 +0000 (13:15 -0800)]
Don't pack relocations in libc.so

Ic9125cc1bc4c9ba9eb20d030de72e3ce1fb86fa6 disabled relocation packing
in libc.so, but the flag was dropped when we switched to Android.bp
in Ib0ba2d28bff88483b505426ba61606da314e03ab.

Bug: 20645321
Bug: 20655855
Bug: 32750616
Test: builds
Test: inspect out/build-aosp_angler.ninja
Test: run app that crashes with packed libc.so
Change-Id: Ib0630f2e342afa543bb88303fec8f9695ac583e9

7 years agoMerge "Differentiate the wctype functions we need to improve."
Elliott Hughes [Tue, 15 Nov 2016 19:04:25 +0000 (19:04 +0000)]
Merge "Differentiate the wctype functions we need to improve."

7 years agoFix deprecated range_x() calls.
Martijn Coenen [Mon, 14 Nov 2016 13:16:08 +0000 (14:16 +0100)]
Fix deprecated range_x() calls.

Test: builds with new libbenchmark.
Change-Id: I91c0e5c1b5cf75b8e551f3c59d83ac9352817c4a

7 years agoMerge changes I72d37b7c,I7d254a10,I2e967acf
Treehugger Robot [Tue, 15 Nov 2016 00:54:08 +0000 (00:54 +0000)]
Merge changes I72d37b7c,I7d254a10,I2e967acf

* changes:
  versioner: use a virtual filesystem for input files.
  versioner: cache -cc1 flags generated by the clang Driver.
  versioner: refactor to use CompilerInstance directly.

7 years agoDifferentiate the wctype functions we need to improve.
Elliott Hughes [Mon, 14 Nov 2016 20:55:59 +0000 (12:55 -0800)]
Differentiate the wctype functions we need to improve.

Some of these are genuinely fine as-is.

Test: bionic tests still pass
Change-Id: Iab6d86d818dcc5857e7932a9effa04001195386f

7 years agoMerge changes I7f32dc9f,I9d88ddb1
Treehugger Robot [Fri, 11 Nov 2016 22:20:17 +0000 (22:20 +0000)]
Merge changes I7f32dc9f,I9d88ddb1

* changes:
  Revert "Revert "Attempt to use arc4random where getauxval(AT_RANDOM) is used.""
  Revert "Revert "Update getentropy_linux.c from upstream.""

7 years agoRevert "Revert "Attempt to use arc4random where getauxval(AT_RANDOM) is used.""
Josh Gao [Fri, 11 Nov 2016 00:08:29 +0000 (16:08 -0800)]
Revert "Revert "Attempt to use arc4random where getauxval(AT_RANDOM) is used.""

This reverts commit 60d052dda600f26fdb6180ac1a2c53e97df5a58a.

Bug: http://b/27729263
Change-Id: I7f32dc9f9a1f21fda3213f10da940821e1bdd63f

7 years agoRevert "Revert "Update getentropy_linux.c from upstream.""
Josh Gao [Fri, 11 Nov 2016 00:08:20 +0000 (16:08 -0800)]
Revert "Revert "Update getentropy_linux.c from upstream.""

This reverts commit b3fbee449c314aee4bdc2f1720a931ea56c32f62.

Bug: http://b/27729263
Change-Id: I9d88ddb11466d203514ae805f4681c92e4b63c24

7 years agoversioner: use a virtual filesystem for input files.
Josh Gao [Wed, 9 Nov 2016 09:00:41 +0000 (01:00 -0800)]
versioner: use a virtual filesystem for input files.

Use an InMemoryFileSystem to store and share input files across
compilations.

This improves the result of `time versioner` further, from:
    versioner  109.12s user 17.43s system 2433% cpu 5.201 total
to:
    versioner  112.20s user 1.38s system 2416% cpu 4.700 total

Bug: http://b/32748936
Test: python run_tests.py
Change-Id: I72d37b7c30850b8399cc40338247700fe3e7b2f9

7 years agoversioner: cache -cc1 flags generated by the clang Driver.
Josh Gao [Wed, 9 Nov 2016 06:21:31 +0000 (22:21 -0800)]
versioner: cache -cc1 flags generated by the clang Driver.

Profiling showed that majority of time spent by versioner was being
spent in the x86 and x86_64 driver statting random files in /usr/lib,
looking for a toolchain. Hardcode a list of per-target flags which
correspond to a subset of the ones generated by clang, and use those
instead of calling out to Driver.

This changes the result of `time versioner` from:
    versioner  156.57s user 1180.08s system 4109% cpu 32.525 total
to:
    versioner  109.12s user 17.43s system 2433% cpu 5.201 total

Bug: http://b/32748936
Test: python run_tests.py
Change-Id: I7d254a105bf1a283cbba0546321b04e308e703d1

7 years agoversioner: refactor to use CompilerInstance directly.
Josh Gao [Tue, 8 Nov 2016 02:27:16 +0000 (18:27 -0800)]
versioner: refactor to use CompilerInstance directly.

This will make it easier to switch over to a virtual filesystem,
which should drastically improve performance.

This also fixes an issue with warning/error reporting.

Bug: http://b/32748936
Test: python run_tests.py
Change-Id: I2e967acf75db29c95f3a03f4f94cccd22c367ad5

7 years agoMerge "versioner: don't always hide future decls."
Treehugger Robot [Wed, 9 Nov 2016 02:07:17 +0000 (02:07 +0000)]
Merge "versioner: don't always hide future decls."

7 years agoMerge "Document how to run the benchmarks."
Treehugger Robot [Wed, 9 Nov 2016 01:20:58 +0000 (01:20 +0000)]
Merge "Document how to run the benchmarks."

7 years agoMerge "Fix error case to print newlines properly."
Treehugger Robot [Wed, 9 Nov 2016 00:33:12 +0000 (00:33 +0000)]
Merge "Fix error case to print newlines properly."

7 years agoversioner: don't always hide future decls.
Josh Gao [Wed, 9 Nov 2016 00:17:45 +0000 (16:17 -0800)]
versioner: don't always hide future decls.

Bug: http://b/32748732
Test: python run_tests.py
Change-Id: I8f799015ebb1017f5e7d1324fb4c724e12a268bc

7 years agoDocument how to run the benchmarks.
Elliott Hughes [Tue, 8 Nov 2016 23:38:26 +0000 (15:38 -0800)]
Document how to run the benchmarks.

Test: N/A
Change-Id: I13bf4f1b5a218e06e68ff8eb8156843175f2648a

7 years agoFix error case to print newlines properly.
Christopher Ferris [Tue, 8 Nov 2016 22:05:18 +0000 (14:05 -0800)]
Fix error case to print newlines properly.

Bug: 32640542

Test: Built and ran on a failing device.
Change-Id: I81a578af7608c741819062bd54aa8e348a621b83

7 years agoMerge "Eliminate deadlock in forked child due to delayed resetting mutex lock"
Dimitry Ivanov [Tue, 8 Nov 2016 20:59:42 +0000 (20:59 +0000)]
Merge "Eliminate deadlock in forked child due to delayed resetting mutex lock"

7 years agoMerge "Remove bogus OPEN_MAX and CHILD_MAX constants."
Elliott Hughes [Tue, 8 Nov 2016 01:05:47 +0000 (01:05 +0000)]
Merge "Remove bogus OPEN_MAX and CHILD_MAX constants."

7 years agoMerge "Add legacy inlines for fenv APIs."
Treehugger Robot [Mon, 7 Nov 2016 23:51:40 +0000 (23:51 +0000)]
Merge "Add legacy inlines for fenv APIs."

7 years agoMerge "Show amount of parallelism in gtest output."
Treehugger Robot [Mon, 7 Nov 2016 22:48:49 +0000 (22:48 +0000)]
Merge "Show amount of parallelism in gtest output."

7 years agoRemove bogus OPEN_MAX and CHILD_MAX constants.
Elliott Hughes [Mon, 7 Nov 2016 22:03:00 +0000 (14:03 -0800)]
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

7 years agoAdd legacy inlines for fenv APIs.
Dan Albert [Fri, 4 Nov 2016 18:39:16 +0000 (11:39 -0700)]
Add legacy inlines for fenv APIs.

Test: make native
      Copied into the NDK and ran ndk/checkbuild.py
Bug: None

Change-Id: I3d1e9317952ad23145a1f5221e347a16ebad4b0d

7 years agoMerge changes I660ddce6,Ic58d0481,I5d45aa72
Treehugger Robot [Mon, 7 Nov 2016 19:12:38 +0000 (19:12 +0000)]
Merge changes I660ddce6,Ic58d0481,I5d45aa72

* changes:
  Mark LIBC_DEPRECATED as platform-only.
  Remove _ZTV9type_info from the version script.
  Run genversion-scripts.py.

7 years agoMerge "Fix cortex-a53 inclusion of files."
Christopher Ferris [Mon, 7 Nov 2016 16:42:55 +0000 (16:42 +0000)]
Merge "Fix cortex-a53 inclusion of files."

7 years agoMerge "Fix format macros for fast16 and fast32 int types."
Elliott Hughes [Mon, 7 Nov 2016 16:33:35 +0000 (16:33 +0000)]
Merge "Fix format macros for fast16 and fast32 int types."

7 years agoMerge "Make prctl test check maps."
Christopher Ferris [Mon, 7 Nov 2016 16:06:03 +0000 (16:06 +0000)]
Merge "Make prctl test check maps."

7 years agoMerge "Update timezone data to 2016i."
Neil Fuller [Mon, 7 Nov 2016 11:11:13 +0000 (11:11 +0000)]
Merge "Update timezone data to 2016i."

7 years agoFix cortex-a53 inclusion of files.
Christopher Ferris [Mon, 7 Nov 2016 07:35:15 +0000 (23:35 -0800)]
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

7 years agoMake prctl test check maps.
Christopher Ferris [Thu, 3 Nov 2016 23:06:40 +0000 (16:06 -0700)]
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

7 years agoEliminate deadlock in forked child due to delayed resetting mutex lock
Mingwei Shi [Thu, 3 Nov 2016 14:53:45 +0000 (14:53 +0000)]
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>
7 years agoMerge "Clean up update_headers.sh."
Treehugger Robot [Sat, 5 Nov 2016 20:09:12 +0000 (20:09 +0000)]
Merge "Clean up update_headers.sh."

7 years agoMerge "Set __get_thread()->tid as part of clone()."
Treehugger Robot [Sat, 5 Nov 2016 01:24:13 +0000 (01:24 +0000)]
Merge "Set __get_thread()->tid as part of clone()."

7 years agoMark LIBC_DEPRECATED as platform-only.
Dan Albert [Fri, 4 Nov 2016 22:04:28 +0000 (15:04 -0700)]
Mark LIBC_DEPRECATED as platform-only.

These symbols should not be exposed in the NDK.

Test: make native
Bug: None
Change-Id: I660ddce6d67bfdac029e31ef8dde2985fd4b1de5

7 years agoRemove _ZTV9type_info from the version script.
Dan Albert [Fri, 4 Nov 2016 23:48:53 +0000 (16:48 -0700)]
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

7 years agoRun genversion-scripts.py.
Dan Albert [Fri, 4 Nov 2016 22:05:30 +0000 (15:05 -0700)]
Run genversion-scripts.py.

I forgot to run this after adding NDK info to libstdc++.

Test: make native
Bug: None
Change-Id: I5d45aa7207b9eb548a233442aa0e3ab77d98baeb

7 years agoMerge changes I9d050e54,Ic487036a
Treehugger Robot [Fri, 4 Nov 2016 23:06:55 +0000 (23:06 +0000)]
Merge changes I9d050e54,Ic487036a

* changes:
  versioner: allow static inlines that don't conflict.
  versioner: fix output.

7 years agoSet __get_thread()->tid as part of clone().
Robert Sesek [Thu, 3 Nov 2016 19:00:53 +0000 (15:00 -0400)]
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

7 years agoversioner: allow static inlines that don't conflict.
Josh Gao [Fri, 4 Nov 2016 20:15:11 +0000 (13:15 -0700)]
versioner: allow static inlines that don't conflict.

Bug: http://b/32664285
Test: python run_test.py
Change-Id: I9d050e545390eccd82661325c0ec58055f5f28a3

7 years agoversioner: fix output.
Josh Gao [Fri, 4 Nov 2016 19:04:38 +0000 (12:04 -0700)]
versioner: fix output.

Bug: http://b/32664285
Test: python run_test.py
Change-Id: Ic487036a17cc6778493e316146e54ead8ce3e65b

7 years agoClean up update_headers.sh.
Dan Albert [Fri, 4 Nov 2016 18:40:27 +0000 (11:40 -0700)]
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

7 years agoUpdate timezone data to 2016i.
Neil Fuller [Fri, 4 Nov 2016 16:23:47 +0000 (16:23 +0000)]
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

7 years agoMerge "Small cleanup of cortex-a15 code."
Christopher Ferris [Thu, 3 Nov 2016 22:40:16 +0000 (22:40 +0000)]
Merge "Small cleanup of cortex-a15 code."

7 years agoMerge changes I751520a1,I5762e815
Treehugger Robot [Wed, 2 Nov 2016 19:56:09 +0000 (19:56 +0000)]
Merge changes I751520a1,I5762e815

* changes:
  Add legacy inline for wait4.
  Revert "Add legacy inlines for locale aware APIs."

7 years agoMerge "Copy the NOTICE file when updating headers."
Treehugger Robot [Wed, 2 Nov 2016 19:48:42 +0000 (19:48 +0000)]
Merge "Copy the NOTICE file when updating headers."

7 years agoSmall cleanup of cortex-a15 code.
Christopher Ferris [Tue, 1 Nov 2016 21:25:57 +0000 (14:25 -0700)]
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

7 years agoAdd legacy inline for wait4.
Dan Albert [Tue, 1 Nov 2016 03:12:03 +0000 (20:12 -0700)]
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

7 years agoRevert "Add legacy inlines for locale aware APIs."
Dan Albert [Mon, 31 Oct 2016 23:20:47 +0000 (16:20 -0700)]
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 6576a3749bd3805508294bfcac3d9658fc0f8d6e.

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

7 years agoCopy the NOTICE file when updating headers.
Dan Albert [Thu, 20 Oct 2016 19:45:03 +0000 (12:45 -0700)]
Copy the NOTICE file when updating headers.

Test: ./update_headers.sh
Bug: None
Change-Id: Ibde1e6d7ef1750d8369b65b3125b55023efb5b2a

7 years agoMerge "Fix gettid() after clone()."
Treehugger Robot [Sat, 29 Oct 2016 02:09:55 +0000 (02:09 +0000)]
Merge "Fix gettid() after clone()."

7 years agoMerge "Replace .align with .balign for clarity"
Treehugger Robot [Fri, 28 Oct 2016 17:23:48 +0000 (17:23 +0000)]
Merge "Replace .align with .balign for clarity"

7 years agoShow amount of parallelism in gtest output.
Elliott Hughes [Fri, 28 Oct 2016 17:04:44 +0000 (10:04 -0700)]
Show amount of parallelism in gtest output.

Bug: http://b/19075519
Test: ran tests
Change-Id: Ia190f728cc28e2283636e9cfea927e525d6c10c8

7 years agoFix gettid() after clone().
Robert Sesek [Tue, 25 Oct 2016 14:29:02 +0000 (10:29 -0400)]
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

7 years agoMerge "Use ENTRY_PRIVATE in __bionic_clone assembler."
Treehugger Robot [Thu, 27 Oct 2016 23:07:28 +0000 (23:07 +0000)]
Merge "Use ENTRY_PRIVATE in __bionic_clone assembler."

7 years agoReplace .align with .balign for clarity
Dimitry Ivanov [Thu, 27 Oct 2016 09:32:47 +0000 (02:32 -0700)]
Replace .align with .balign for clarity

Test: run bionic-unit-tests
Change-Id: Icb43cc47e41d58fe3cb71986e05b3134022f895c

7 years agoFix format macros for fast16 and fast32 int types.
Xiaolei Yu [Tue, 25 Oct 2016 14:10:51 +0000 (22:10 +0800)]
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

7 years agoUse ENTRY_PRIVATE in __bionic_clone assembler.
Elliott Hughes [Thu, 27 Oct 2016 00:01:32 +0000 (17:01 -0700)]
Use ENTRY_PRIVATE in __bionic_clone assembler.

Bug: N/A
Test: bionic tests
Change-Id: Ic651d628be009487a36d0b2e5bcf900b981b1ef9

7 years agoMerge "Make versioner build with LLVM r275480"
Pirama Arumuga Nainar [Wed, 26 Oct 2016 17:35:50 +0000 (17:35 +0000)]
Merge "Make versioner build with LLVM r275480"

7 years agoMerge "_FILE_OFFSET_BITS=64's posix_fallocate should be posix_fallocate64."
Elliott Hughes [Wed, 26 Oct 2016 15:33:11 +0000 (15:33 +0000)]
Merge "_FILE_OFFSET_BITS=64's posix_fallocate should be posix_fallocate64."

7 years ago_FILE_OFFSET_BITS=64's posix_fallocate should be posix_fallocate64.
Elliott Hughes [Tue, 25 Oct 2016 21:13:32 +0000 (14:13 -0700)]
_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

7 years agoMake versioner build with LLVM r275480
Pirama Arumuga Nainar [Fri, 16 Sep 2016 23:56:15 +0000 (16:56 -0700)]
Make versioner build with LLVM r275480

Bug: http://b/31320715

Test: tools/versioner/preupload.sh
Change-Id: Icdff19b214b2b26c60288e49d26a88f04df68ef0