Commit graph

16007 commits

Author SHA1 Message Date
Yabin Cui
304348af19 Clear pthread_internal_t allocated on user provided stack.
Several parts in pthread_internal_t should be initialized
to zero, like tls, key_data and thread_local_dtors. So
just clear the whole pthread_internal_t is more convenient.

Bug: 25990348
Change-Id: Ibb6d1200ea5e6e1afbc77971f179197e8239f6ea
2015-12-03 16:51:20 -08:00
Yabin Cui
fb3708640f Merge "Don\'t use StringPrintf() in gtest runner."
am: 514f46b74c

* commit '514f46b74c5424eb10f21349654e90fcf69b3b10':
  Don't use StringPrintf() in gtest runner.
2015-12-04 00:35:30 +00:00
Yabin Cui
514f46b74c Merge "Don't use StringPrintf() in gtest runner." 2015-12-04 00:29:47 +00:00
Yabin Cui
a32fc8685d Don't use StringPrintf() in gtest runner.
Change-Id: I0cd0b3cbb952c65b1c449e88ce12964b93029538
2015-12-03 16:28:03 -08:00
Tom Cherry
e670e2f859 Merge "Remove c++14\'isms from system_properties"
am: b35a2fb370

* commit 'b35a2fb370db711fcea38441a1295cd542fc3daa':
  Remove c++14'isms from system_properties
2015-12-03 23:53:24 +00:00
Dimitry Ivanov
0ee40ef239 Merge "libm: stop exporting __muldc3"
am: bf20d0226b

* commit 'bf20d0226b28a029f4cade8dc8f3aa38d1e51a1a':
  libm: stop exporting __muldc3
2015-12-03 23:53:13 +00:00
Tom Cherry
b35a2fb370 Merge "Remove c++14'isms from system_properties" 2015-12-03 23:48:54 +00:00
Dimitry Ivanov
bf20d0226b Merge "libm: stop exporting __muldc3" 2015-12-03 23:44:59 +00:00
Tom Cherry
845e24a05e Remove c++14'isms from system_properties
Change-Id: If78e7d2770e8f8321f0d1824c3c52f93820dd325
2015-12-03 15:40:23 -08:00
Dimitry Ivanov
a2ead18657 libm: stop exporting __muldc3
Bug: http://b/26004493
Change-Id: I991268d5e7b59bca646da25d0ad90a1cb4a9d4b9
2015-12-03 15:25:37 -08:00
Tom Cherry
84bc4f5cc7 Merge "Separate properties by selabel"
am: 376b94f1e7

* commit '376b94f1e777375eb9ebb04a882b898aafa94625':
  Separate properties by selabel
2015-12-03 22:58:48 +00:00
Tom Cherry
376b94f1e7 Merge "Separate properties by selabel" 2015-12-03 22:55:32 +00:00
Yabin Cui
b561043d3a Merge "Improve unit test runner."
am: f57ae1cd43

* commit 'f57ae1cd433f2bdc02cec6b0d2666f7708f1fc37':
  Improve unit test runner.
2015-12-03 22:34:44 +00:00
Yabin Cui
f57ae1cd43 Merge "Improve unit test runner." 2015-12-03 22:29:29 +00:00
Elliott Hughes
4371961e00 Remove __sinit and __sdidinit.
We're eagerly initializing stdio now, so this can all be simplified.

Change-Id: Icb288f8dd0ee08f02bea0d23670f75e78bed6b99
2015-12-03 13:23:03 -08:00
Yabin Cui
d4c9b9d5ac Improve unit test runner.
1. Read unit test's output while the test is running. Previously
we only read output when the test finishes, which has trouble
when the test outputs too many stuff.
2. Report failed unit test's exit code. It is useful when the
test doesn't fail in ASSERT_xxx, but in somewhere else.

Bug: 25392375
Change-Id: Ie90823337f7c2ee25fa489a5534801d991258f95
2015-12-03 13:20:39 -08:00
Dan Willemsen
5bfa22ceab Merge "Re-add putw for LP32"
am: 22dca83e1c

* commit '22dca83e1c37d3b465b9fa432bbf7cb4bd0df868':
  Re-add putw for LP32
2015-12-03 02:01:07 +00:00
Dan Willemsen
22dca83e1c Merge "Re-add putw for LP32" 2015-12-03 01:56:00 +00:00
Dan Willemsen
b9055518fc Re-add putw for LP32
This was missed when switching to LOCAL_SRC_FILES_EXCLUDE

Change-Id: I6ea23c9eb31abe11e0ec4abfc2ee2f2a43c76ce2
2015-12-02 17:31:32 -08:00
Tom Cherry
49a309ff6a Separate properties by selabel
The purpose of this change is to add read access control to the property
space.

In the current design, a process either has access to the single
/dev/__properties__ file and therefore all properties that it contains
or it has access to no properties.  This change separates properties
into multiple property files based on their selabel, which allows
creation of sepolicies that allow read access of only specific sets of
properties to specific domains.

Bug 21852512

Change-Id: Ice265db79201ca811c6b6cf6d851703f53224f03
2015-12-02 15:17:03 -08:00
Dimitry Ivanov
9f525b66eb Merge "Explicitly disallow default c-tor"
am: b24f7a0513

* commit 'b24f7a0513f7468ccf7563d7d347c6e7bab391d9':
  Explicitly disallow default c-tor
2015-12-02 18:47:27 +00:00
Dimitry Ivanov
b24f7a0513 Merge "Explicitly disallow default c-tor" 2015-12-02 18:44:20 +00:00
Dimitry Ivanov
a5e183c066 Explicitly disallow default c-tor
Change-Id: Ia52995a459443159e80383d5b396c3edd90a08ae
2015-12-01 16:57:19 -08:00
Chih-hung Hsieh
d74566026d Merge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc."
am: 9cbabd8fe5

* commit '9cbabd8fe5ef3834682996ff23b4a5325e0586cb':
  Add bionic-unit-tests-gcc{32,64}, compiled with gcc.
2015-12-01 00:27:13 +00:00
Chih-hung Hsieh
9cbabd8fe5 Merge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc." 2015-12-01 00:23:32 +00:00
Yabin Cui
1f4b0c44b3 Merge "Init stdio in __libc_init_common."
am: 6bef152af2

* commit '6bef152af2c622ee0c57f9c374b76f3dd352e52b':
  Init stdio in __libc_init_common.
2015-11-30 23:58:50 +00:00
Yabin Cui
4262d3e9ac Merge "Enable using clang to build __cxa_thread_atexit_impl."
am: af87c9ccfc

* commit 'af87c9ccfc3afbc7db9f0bc131d122453b5c882d':
  Enable using clang to build __cxa_thread_atexit_impl.
2015-11-30 23:58:41 +00:00
Yabin Cui
6bef152af2 Merge "Init stdio in __libc_init_common." 2015-11-30 23:57:02 +00:00
Yabin Cui
af87c9ccfc Merge "Enable using clang to build __cxa_thread_atexit_impl." 2015-11-30 23:56:41 +00:00
Yabin Cui
9b687dc243 Enable using clang to build __cxa_thread_atexit_impl.
Remove previous workaround as we no longer use
__thread in __cxa_thread_atexit_impl.cpp.

Change-Id: Ic1062995db488859b341acdda0b5f6635e10d7e8
2015-11-30 14:43:52 -08:00
Yabin Cui
51ca18d2a1 Merge "Don\'t use __thread in __cxa_thread_finalize()."
am: 28d3f00cf4

* commit '28d3f00cf4545812503c835ea906fa83309e48ed':
  Don't use __thread in __cxa_thread_finalize().
2015-11-30 22:01:36 +00:00
Yabin Cui
28d3f00cf4 Merge "Don't use __thread in __cxa_thread_finalize()." 2015-11-30 21:59:47 +00:00
Yabin Cui
d68c9e5906 Init stdio in __libc_init_common.
Previously we call __sinit() lazily. But it is likely to cause data
races like in https://android-review.googlesource.com/#/c/183237/. So
we prefer to call __sinit() explicitly at libc initialization.

Bug: 25392375

Change-Id: I181ea7a4b2e4c7350b45f2e6c86886ea023e80b8
2015-11-30 13:51:07 -08:00
Yabin Cui
6ac2fdd0f4 Merge "Fix pthread_test according to tsan report."
am: aec13988da

* commit 'aec13988dab7ff32cb005f42b952e3b9b55a4779':
  Fix pthread_test according to tsan report.
2015-11-30 21:42:42 +00:00
Yabin Cui
aec13988da Merge "Fix pthread_test according to tsan report." 2015-11-30 21:38:59 +00:00
Chih-hung Hsieh
4f94b7bfc0 Merge "Consider when building libc_thread_atexit_impl module"
am: 2bb85c848a

* commit '2bb85c848abb89951ec01342d6c8278311346395':
  Consider $(use_clang) when building libc_thread_atexit_impl module
2015-11-30 19:02:05 +00:00
Chih-hung Hsieh
2bb85c848a Merge "Consider $(use_clang) when building libc_thread_atexit_impl module" 2015-11-30 18:58:59 +00:00
Chih-Hung Hsieh
f688c5d5b4 Add bionic-unit-tests-gcc{32,64}, compiled with gcc.
* bionic-unit-tests{32,64} are compiled with clang/llvm.
* Skip one single test in __cxa_thread_atexit_test.cpp
  when compiled with aarch64 clang/llvm.
  Aarch64 clang/llvm generates relocation references to
  "thread_local" symbols not supported by Android linker.

BUG: 25642296
Change-Id: Ia0497b79c4b335228afeb48a26e0592217909953
2015-11-30 10:52:16 -08:00
Nikola Veljkovic
83f314f060 Consider $(use_clang) when building libc_thread_atexit_impl module
Change-Id: Ia369d94979f418198a2ee891385942d9bc5604d7
2015-11-25 18:09:34 +00:00
Yabin Cui
952e9eb086 Don't use __thread in __cxa_thread_finalize().
Currently we use __thread variable to store thread_local_dtors,
which makes tsan test fork_atexit.cc hang. The problem is as below:
The main thread creates a worker thread, the worker thread calls
pthread_exit() -> __cxa_thread_finalize() -> __emutls_get_address()
-> pthread_once(emutls_init) -> emutls_init().
Then the main thread calls fork(), the child process cals
exit() -> __cxa_thread_finalize() -> __emutls_get_address()
-> pthread_once(emutls_init).
So the child process is waiting for pthread_once(emutls_init)
to finish which will never occur.

It might be the test's fault because POSIX standard says if a
multi-threaded process calls fork(), the new process may only
execute async-signal-safe operations until exec functions are
called. And exit() is not async-signal-safe. But we can make
bionic more reliable by not using __thread in
__cxa_thread_finalize().

Bug: 25392375
Change-Id: Ife403dd7379dad8ddf1859c348c1c0adea07afb3
2015-11-24 17:24:06 -08:00
Colin Cross
a36d1e0d31 Merge "Remove cflags and ldflags from crt defaults"
am: a01108d9bf

* commit 'a01108d9bf415854b9d36334483133adff3d7405':
  Remove cflags and ldflags from crt defaults
2015-11-24 21:41:22 +00:00
Colin Cross
a01108d9bf Merge "Remove cflags and ldflags from crt defaults" 2015-11-24 21:33:54 +00:00
Colin Cross
912e27a4b2 Merge "move arch variant structs down a level"
am: 8bd27182c5

* commit '8bd27182c505cdc8031ab23fea5d1dccb6b7405a':
  move arch variant structs down a level
2015-11-24 20:24:24 +00:00
Colin Cross
8bd27182c5 Merge "move arch variant structs down a level" 2015-11-24 20:21:20 +00:00
Colin Cross
bff87d19f1 Remove cflags and ldflags from crt defaults
After ToolchainCflags were added to soong crt no longer needs to try to
recreate the bare minimum cflags for compiling for each architecture.
Also always use GCC to match crt.mk

Change-Id: I01a833ab70d989033c84f072e3660d060189688c
2015-11-24 11:11:02 -08:00
Dimitry Ivanov
321314f2e9 Merge "Introduce anonymous namespace"
am: db8caa740a

* commit 'db8caa740a409c2ce75f875df84857e6be69eb9f':
  Introduce anonymous namespace
2015-11-24 02:45:14 +00:00
Dimitry Ivanov
db8caa740a Merge "Introduce anonymous namespace" 2015-11-24 02:23:34 +00:00
Dmitriy Ivanov
1ffec1cc4d Introduce anonymous namespace
The anonymous namespace is introduced to
handle cases when linker can not find the
caller. This usually happens when caller
code was not loaded by dynamic linker;
for example mono-generated code.

Bug: http://b/25844435
Bug: http://b/22548808
Change-Id: I9e5b1d23c1c75bc78548d68e79216a6a943a33cf
2015-11-23 16:13:10 -08:00
Colin Cross
6ab8f89d1c move arch variant structs down a level
Use blueprint's new anonymous embedded struct feature to move the arch
variant properties down a level, replacing arch.cortex_a9.srcs with
arch.arm.cortex_a9.srcs, while still supporting top-level properties
like arch.arm.srcs.

Change-Id: Ib41c80e3549440d5efdfd293a15cffa3f51a0fe4
2015-11-23 14:14:57 -08:00
Yabin Cui
edcee4e401 Merge "Change _stdio_handles_locking into _caller_handles_locking."
am: 17554356cc

* commit '17554356cc865908e5cbd7814c8be7e47c9c4ec5':
  Change _stdio_handles_locking into _caller_handles_locking.
2015-11-23 19:02:08 +00:00