OSDN Git Service

android-x86/bionic.git
8 years agoMerge "Revert "Revert "Remove __sinit and __sdidinit.""" am: c4eef1fb5b
Elliott Hughes [Mon, 7 Dec 2015 23:37:17 +0000 (23:37 +0000)]
Merge "Revert "Revert "Remove __sinit and __sdidinit.""" am: c4eef1fb5b
am: 568ad51d80

* commit '568ad51d803228b287a91a307806d1771ed81b7b':
  Revert "Revert "Remove __sinit and __sdidinit.""

8 years agoMerge "Revert "Revert "Remove __sinit and __sdidinit."""
Elliott Hughes [Mon, 7 Dec 2015 23:14:29 +0000 (23:14 +0000)]
Merge "Revert "Revert "Remove __sinit and __sdidinit."""
am: c4eef1fb5b

* commit 'c4eef1fb5ba325317e94b598c6fbf8e4c4bf83e1':
  Revert "Revert "Remove __sinit and __sdidinit.""

8 years agoMerge "Revert "Revert "Remove __sinit and __sdidinit."""
Elliott Hughes [Mon, 7 Dec 2015 18:19:07 +0000 (18:19 +0000)]
Merge "Revert "Revert "Remove __sinit and __sdidinit."""

8 years agoRevert "Revert "Remove __sinit and __sdidinit.""
Elliott Hughes [Sat, 5 Dec 2015 02:03:12 +0000 (18:03 -0800)]
Revert "Revert "Remove __sinit and __sdidinit.""

This reverts commit c8bae05f3ff9f1c736f7be70fa17d02795d748bb.

We were breaking init (ueventd) because we initialize system properties
before we initialize stdio. The new system property implementation uses
stdio to read from /property_contexts, so we end up touching stdio data
structures before they've been initialized.

This second attempt takes things further by removing the stdio initialization
function altogether. The data structures for stdin/stdout/stderr can be
statically initialized as data, and -- since we already had to give the
atexit implementation a backdoor for stdio -- we can just admit that we
need to clean up stdio, and that we always do so last.

This patch also removes the 17 statically pre-allocated file structures,
so the first fopen will now allocate a block of 10 (the usual overflow
behavior). I did this just to make my life simpler, but it's not actually
necessary to remove it if we want it back.

Change-Id: I936b2eb5e88e4ebaf5516121872b71fc88e5609c

8 years agoMerge "Allow dlopening public libs using absolute path" am: e371ae68ac
Dimitry Ivanov [Sat, 5 Dec 2015 05:32:30 +0000 (05:32 +0000)]
Merge "Allow dlopening public libs using absolute path" am: e371ae68ac
am: d5ce2a93af

* commit 'd5ce2a93afe7f5cb5b26d2752b84e3376b3c2037':
  Allow dlopening public libs using absolute path

8 years agoMerge "Allow dlopening public libs using absolute path"
Dimitry Ivanov [Sat, 5 Dec 2015 05:29:52 +0000 (05:29 +0000)]
Merge "Allow dlopening public libs using absolute path"
am: e371ae68ac

* commit 'e371ae68ac0d6d39cacf5edc893bda2f4a61e883':
  Allow dlopening public libs using absolute path

8 years agoMerge "Allow dlopening public libs using absolute path"
Dimitry Ivanov [Sat, 5 Dec 2015 05:25:57 +0000 (05:25 +0000)]
Merge "Allow dlopening public libs using absolute path"

8 years agoAllow dlopening public libs using absolute path
Dimitry Ivanov [Sat, 5 Dec 2015 02:28:49 +0000 (18:28 -0800)]
Allow dlopening public libs using absolute path

dlopen on isolated namespaces should be able to open
public libraries using absolute path not only soname.

Bug: http://b/25853820
Change-Id: If574a67853dc51226f0f376e9e2d108316002f84

8 years agoMerge "Revert "Remove __sinit and __sdidinit."" am: 0d89913e74
Elliott Hughes [Sat, 5 Dec 2015 02:01:42 +0000 (02:01 +0000)]
Merge "Revert "Remove __sinit and __sdidinit."" am: 0d89913e74
am: f4e511ecf9

* commit 'f4e511ecf99dab30aeecba4ab1da29a3b89bbbaa':
  Revert "Remove __sinit and __sdidinit."

8 years agoMerge "Revert "Remove __sinit and __sdidinit.""
Elliott Hughes [Sat, 5 Dec 2015 01:58:40 +0000 (01:58 +0000)]
Merge "Revert "Remove __sinit and __sdidinit.""
am: 0d89913e74

* commit '0d89913e74981cd51532e66a2e2f138392be4de1':
  Revert "Remove __sinit and __sdidinit."

8 years agoMerge "Revert "Remove __sinit and __sdidinit.""
Elliott Hughes [Sat, 5 Dec 2015 01:53:21 +0000 (01:53 +0000)]
Merge "Revert "Remove __sinit and __sdidinit.""

8 years agoRevert "Remove __sinit and __sdidinit."
Elliott Hughes [Sat, 5 Dec 2015 01:47:20 +0000 (17:47 -0800)]
Revert "Remove __sinit and __sdidinit."

This reverts commit 4371961e00ad83fca033992c8a19c7d262fe6f84.

This broke booting; ueventd crashes with a null pointer dereference
somewhere in __sfp (but the kernel doesn't unwind, so I don't know
what was calling __sfp).

Change-Id: I65375fdfdf1d339a06558b4057b580cacd6324e2

8 years agoMerge "Do not create prop files for ctl.* properties" am: 4ade5195f1
Tom Cherry [Sat, 5 Dec 2015 00:31:12 +0000 (16:31 -0800)]
Merge "Do not create prop files for ctl.* properties" am: 4ade5195f1
am: 071234cfd9

* commit '071234cfd9d97c9f7ac640d755e6de900480a846':
  Do not create prop files for ctl.* properties

8 years agoMerge "Do not create prop files for ctl.* properties"
Tom Cherry [Sat, 5 Dec 2015 00:27:56 +0000 (00:27 +0000)]
Merge "Do not create prop files for ctl.* properties"
am: 4ade5195f1

* commit '4ade5195f188b84ce3599c71ef058d040b141da4':
  Do not create prop files for ctl.* properties

8 years agoMerge "Do not create prop files for ctl.* properties"
Tom Cherry [Sat, 5 Dec 2015 00:21:46 +0000 (00:21 +0000)]
Merge "Do not create prop files for ctl.* properties"

8 years agoMerge "Fix GCC build." am: ef2ba3dbf9
Elliott Hughes [Sat, 5 Dec 2015 00:06:11 +0000 (16:06 -0800)]
Merge "Fix GCC build." am: ef2ba3dbf9
am: 70d477c913

* commit '70d477c913981047235054b6bbb4faa5bfcafb8f':
  Fix GCC build.

8 years agoMerge "Fix GCC build."
Elliott Hughes [Sat, 5 Dec 2015 00:02:27 +0000 (16:02 -0800)]
Merge "Fix GCC build."
am: ef2ba3dbf9

* commit 'ef2ba3dbf986257ded12531fe15bf0d1d4a87d50':
  Fix GCC build.

8 years agoDo not create prop files for ctl.* properties
Tom Cherry [Fri, 4 Dec 2015 23:53:25 +0000 (15:53 -0800)]
Do not create prop files for ctl.* properties

Change-Id: Ia6660c68c9e0cb89938751dbc0747ee038394778

8 years agoMerge "Fix GCC build."
Elliott Hughes [Fri, 4 Dec 2015 23:54:15 +0000 (23:54 +0000)]
Merge "Fix GCC build."

8 years agoFix GCC build.
Elliott Hughes [Fri, 4 Dec 2015 23:53:25 +0000 (15:53 -0800)]
Fix GCC build.

  error: '__sdidinit' initialized and declared 'extern' [-Werror]

Change-Id: I97d9c174da6a99ca61b72572dfb4694813372a60

8 years agoMerge "Track rename from base/ to android-base/." am: 0b40c13a5a
Elliott Hughes [Fri, 4 Dec 2015 23:37:40 +0000 (23:37 +0000)]
Merge "Track rename from base/ to android-base/." am: 0b40c13a5a
am: a3f5912129

* commit 'a3f5912129b852196cdcb2b7b0873af723f1bb1f':
  Track rename from base/ to android-base/.

8 years agoMerge "Remove __sinit and __sdidinit." am: 2558b11230
Elliott Hughes [Fri, 4 Dec 2015 23:37:34 +0000 (23:37 +0000)]
Merge "Remove __sinit and __sdidinit." am: 2558b11230
am: 942d81c246

* commit '942d81c246fca0e840fd7917451f67a3ff6a7caa':
  Remove __sinit and __sdidinit.

8 years agoMerge "Track rename from base/ to android-base/."
Elliott Hughes [Fri, 4 Dec 2015 23:33:45 +0000 (23:33 +0000)]
Merge "Track rename from base/ to android-base/."
am: 0b40c13a5a

* commit '0b40c13a5a2da127cb1203d33a3d170671b39247':
  Track rename from base/ to android-base/.

8 years agoMerge "Remove __sinit and __sdidinit."
Elliott Hughes [Fri, 4 Dec 2015 23:33:39 +0000 (23:33 +0000)]
Merge "Remove __sinit and __sdidinit."
am: 2558b11230

* commit '2558b112300e0a27590b9e31f627fe94594fa6a0':
  Remove __sinit and __sdidinit.

8 years agoMerge "Track rename from base/ to android-base/."
Elliott Hughes [Fri, 4 Dec 2015 23:30:09 +0000 (23:30 +0000)]
Merge "Track rename from base/ to android-base/."

8 years agoTrack rename from base/ to android-base/.
Elliott Hughes [Fri, 4 Dec 2015 23:27:46 +0000 (15:27 -0800)]
Track rename from base/ to android-base/.

Change-Id: I0a4592945400b1fa6892bf7c1fa8659fd711efa3

8 years agoMerge "Remove __sinit and __sdidinit."
Elliott Hughes [Fri, 4 Dec 2015 23:27:07 +0000 (23:27 +0000)]
Merge "Remove __sinit and __sdidinit."

8 years agoMerge "add checks for initialization for system properties" am: 136bf8fa45
Tom Cherry [Fri, 4 Dec 2015 23:14:13 +0000 (23:14 +0000)]
Merge "add checks for initialization for system properties" am: 136bf8fa45
am: e049fa71cb

* commit 'e049fa71cb918b3b0f0dde5b4c7a650a5b6ee88a':
  add checks for initialization for system properties

8 years agoMerge "add checks for initialization for system properties"
Tom Cherry [Fri, 4 Dec 2015 23:09:42 +0000 (15:09 -0800)]
Merge "add checks for initialization for system properties"
am: 136bf8fa45

* commit '136bf8fa45b243b56a8f2543d43970f253118cd7':
  add checks for initialization for system properties

8 years agoMerge "add checks for initialization for system properties"
Tom Cherry [Fri, 4 Dec 2015 23:06:31 +0000 (23:06 +0000)]
Merge "add checks for initialization for system properties"

8 years agoadd checks for initialization for system properties
Tom Cherry [Fri, 4 Dec 2015 19:34:42 +0000 (11:34 -0800)]
add checks for initialization for system properties

If a __system_property* function is called before
__system_properties_init() then the app will will abort.  This commit
returns either an error code or a safe return value instead.

Bug 26027140

Change-Id: I95ffd143e9563658ab67a397991e84fb4c46ab77

8 years agoMerge "Clear pthread_internal_t allocated on user provided stack." am: 2452cf3c33
Yabin Cui [Fri, 4 Dec 2015 01:09:36 +0000 (01:09 +0000)]
Merge "Clear pthread_internal_t allocated on user provided stack." am: 2452cf3c33
am: 21cca02a52

* commit '21cca02a52e76c8a76ddf841bc447de9f650c4f0':
  Clear pthread_internal_t allocated on user provided stack.

8 years agoMerge "Clear pthread_internal_t allocated on user provided stack."
Yabin Cui [Fri, 4 Dec 2015 01:05:37 +0000 (01:05 +0000)]
Merge "Clear pthread_internal_t allocated on user provided stack."
am: 2452cf3c33

* commit '2452cf3c332fdfdae6b6b27b57acaa6786a91c87':
  Clear pthread_internal_t allocated on user provided stack.

8 years agoMerge "Clear pthread_internal_t allocated on user provided stack."
Yabin Cui [Fri, 4 Dec 2015 00:58:05 +0000 (00:58 +0000)]
Merge "Clear pthread_internal_t allocated on user provided stack."

8 years agoClear pthread_internal_t allocated on user provided stack.
Yabin Cui [Thu, 3 Dec 2015 21:01:42 +0000 (13:01 -0800)]
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

8 years agoMerge "Don\'t use StringPrintf() in gtest runner." am: 514f46b74c
Yabin Cui [Fri, 4 Dec 2015 00:39:40 +0000 (00:39 +0000)]
Merge "Don\'t use StringPrintf() in gtest runner." am: 514f46b74c
am: fb3708640f

* commit 'fb3708640fa937710b41defbc3f4c2ab79b44a4f':
  Don't use StringPrintf() in gtest runner.

8 years agoMerge "Don\'t use StringPrintf() in gtest runner."
Yabin Cui [Fri, 4 Dec 2015 00:35:30 +0000 (00:35 +0000)]
Merge "Don\'t use StringPrintf() in gtest runner."
am: 514f46b74c

* commit '514f46b74c5424eb10f21349654e90fcf69b3b10':
  Don't use StringPrintf() in gtest runner.

8 years agoMerge "Don't use StringPrintf() in gtest runner."
Yabin Cui [Fri, 4 Dec 2015 00:29:47 +0000 (00:29 +0000)]
Merge "Don't use StringPrintf() in gtest runner."

8 years agoDon't use StringPrintf() in gtest runner.
Yabin Cui [Fri, 4 Dec 2015 00:28:03 +0000 (16:28 -0800)]
Don't use StringPrintf() in gtest runner.

Change-Id: I0cd0b3cbb952c65b1c449e88ce12964b93029538

8 years agoMerge "Remove c++14\'isms from system_properties" am: b35a2fb370
Tom Cherry [Thu, 3 Dec 2015 23:57:55 +0000 (23:57 +0000)]
Merge "Remove c++14\'isms from system_properties" am: b35a2fb370
am: e670e2f859

* commit 'e670e2f859dd436c43979453dd33c915075cfa4b':
  Remove c++14'isms from system_properties

8 years agoMerge "libm: stop exporting __muldc3" am: bf20d0226b
Dimitry Ivanov [Thu, 3 Dec 2015 23:57:51 +0000 (23:57 +0000)]
Merge "libm: stop exporting __muldc3" am: bf20d0226b
am: 0ee40ef239

* commit '0ee40ef239ec6ddd97f323fa7cbc45ffb649525c':
  libm: stop exporting __muldc3

8 years agoMerge "Remove c++14\'isms from system_properties"
Tom Cherry [Thu, 3 Dec 2015 23:53:24 +0000 (23:53 +0000)]
Merge "Remove c++14\'isms from system_properties"
am: b35a2fb370

* commit 'b35a2fb370db711fcea38441a1295cd542fc3daa':
  Remove c++14'isms from system_properties

8 years agoMerge "libm: stop exporting __muldc3"
Dimitry Ivanov [Thu, 3 Dec 2015 23:53:13 +0000 (23:53 +0000)]
Merge "libm: stop exporting __muldc3"
am: bf20d0226b

* commit 'bf20d0226b28a029f4cade8dc8f3aa38d1e51a1a':
  libm: stop exporting __muldc3

8 years agoMerge "Remove c++14'isms from system_properties"
Tom Cherry [Thu, 3 Dec 2015 23:48:54 +0000 (23:48 +0000)]
Merge "Remove c++14'isms from system_properties"

8 years agoMerge "libm: stop exporting __muldc3"
Dimitry Ivanov [Thu, 3 Dec 2015 23:44:59 +0000 (23:44 +0000)]
Merge "libm: stop exporting __muldc3"

8 years agoRemove c++14'isms from system_properties
Tom Cherry [Thu, 3 Dec 2015 23:38:52 +0000 (15:38 -0800)]
Remove c++14'isms from system_properties

Change-Id: If78e7d2770e8f8321f0d1824c3c52f93820dd325

8 years agolibm: stop exporting __muldc3
Dimitry Ivanov [Thu, 3 Dec 2015 23:25:37 +0000 (15:25 -0800)]
libm: stop exporting __muldc3

Bug: http://b/26004493
Change-Id: I991268d5e7b59bca646da25d0ad90a1cb4a9d4b9

8 years agoMerge "Separate properties by selabel" am: 376b94f1e7
Tom Cherry [Thu, 3 Dec 2015 23:02:44 +0000 (23:02 +0000)]
Merge "Separate properties by selabel" am: 376b94f1e7
am: 84bc4f5cc7

* commit '84bc4f5cc765f54c18c3674e775de5fe88c1e499':
  Separate properties by selabel

8 years agoMerge "Separate properties by selabel"
Tom Cherry [Thu, 3 Dec 2015 22:58:48 +0000 (22:58 +0000)]
Merge "Separate properties by selabel"
am: 376b94f1e7

* commit '376b94f1e777375eb9ebb04a882b898aafa94625':
  Separate properties by selabel

8 years agoMerge "Separate properties by selabel"
Tom Cherry [Thu, 3 Dec 2015 22:55:32 +0000 (22:55 +0000)]
Merge "Separate properties by selabel"

8 years agoMerge "Improve unit test runner." am: f57ae1cd43
Yabin Cui [Thu, 3 Dec 2015 22:37:42 +0000 (22:37 +0000)]
Merge "Improve unit test runner." am: f57ae1cd43
am: b561043d3a

* commit 'b561043d3af664d87bda3519e9e06dbfc8a24130':
  Improve unit test runner.

8 years agoMerge "Improve unit test runner."
Yabin Cui [Thu, 3 Dec 2015 22:34:44 +0000 (22:34 +0000)]
Merge "Improve unit test runner."
am: f57ae1cd43

* commit 'f57ae1cd433f2bdc02cec6b0d2666f7708f1fc37':
  Improve unit test runner.

8 years agoMerge "Improve unit test runner."
Yabin Cui [Thu, 3 Dec 2015 22:29:29 +0000 (22:29 +0000)]
Merge "Improve unit test runner."

8 years agoRemove __sinit and __sdidinit.
Elliott Hughes [Thu, 3 Dec 2015 21:23:03 +0000 (13:23 -0800)]
Remove __sinit and __sdidinit.

We're eagerly initializing stdio now, so this can all be simplified.

Change-Id: Icb288f8dd0ee08f02bea0d23670f75e78bed6b99

8 years agoImprove unit test runner.
Yabin Cui [Tue, 17 Nov 2015 04:39:58 +0000 (20:39 -0800)]
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

8 years agoMerge "Re-add putw for LP32" am: 22dca83e1c
Dan Willemsen [Thu, 3 Dec 2015 02:04:10 +0000 (02:04 +0000)]
Merge "Re-add putw for LP32" am: 22dca83e1c
am: 5bfa22ceab

* commit '5bfa22ceabfcb418337d262967172a90dc573e4b':
  Re-add putw for LP32

8 years agoMerge "Re-add putw for LP32"
Dan Willemsen [Thu, 3 Dec 2015 02:01:07 +0000 (02:01 +0000)]
Merge "Re-add putw for LP32"
am: 22dca83e1c

* commit '22dca83e1c37d3b465b9fa432bbf7cb4bd0df868':
  Re-add putw for LP32

8 years agoMerge "Re-add putw for LP32"
Dan Willemsen [Thu, 3 Dec 2015 01:56:00 +0000 (01:56 +0000)]
Merge "Re-add putw for LP32"

8 years agoRe-add putw for LP32
Dan Willemsen [Thu, 3 Dec 2015 01:26:15 +0000 (17:26 -0800)]
Re-add putw for LP32

This was missed when switching to LOCAL_SRC_FILES_EXCLUDE

Change-Id: I6ea23c9eb31abe11e0ec4abfc2ee2f2a43c76ce2

8 years agoSeparate properties by selabel
Tom Cherry [Wed, 23 Sep 2015 23:09:47 +0000 (16:09 -0700)]
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

8 years agoMerge "Explicitly disallow default c-tor" am: b24f7a0513
Dimitry Ivanov [Wed, 2 Dec 2015 18:51:05 +0000 (18:51 +0000)]
Merge "Explicitly disallow default c-tor" am: b24f7a0513
am: 9f525b66eb

* commit '9f525b66eb0ef7fd03d9387ec1efc1ee833f5077':
  Explicitly disallow default c-tor

8 years agoMerge "Explicitly disallow default c-tor"
Dimitry Ivanov [Wed, 2 Dec 2015 18:47:27 +0000 (18:47 +0000)]
Merge "Explicitly disallow default c-tor"
am: b24f7a0513

* commit 'b24f7a0513f7468ccf7563d7d347c6e7bab391d9':
  Explicitly disallow default c-tor

8 years agoMerge "Explicitly disallow default c-tor"
Dimitry Ivanov [Wed, 2 Dec 2015 18:44:20 +0000 (18:44 +0000)]
Merge "Explicitly disallow default c-tor"

8 years agoExplicitly disallow default c-tor
Dimitry Ivanov [Wed, 2 Dec 2015 00:57:19 +0000 (16:57 -0800)]
Explicitly disallow default c-tor

Change-Id: Ia52995a459443159e80383d5b396c3edd90a08ae

8 years agoMerge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc." am: 9cbabd8fe5
Chih-hung Hsieh [Tue, 1 Dec 2015 00:30:41 +0000 (00:30 +0000)]
Merge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc." am: 9cbabd8fe5
am: d74566026d

* commit 'd74566026d439e915ce56c9cf739181187d05192':
  Add bionic-unit-tests-gcc{32,64}, compiled with gcc.

8 years agoMerge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc."
Chih-hung Hsieh [Tue, 1 Dec 2015 00:27:13 +0000 (00:27 +0000)]
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.

8 years agoMerge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc."
Chih-hung Hsieh [Tue, 1 Dec 2015 00:23:32 +0000 (00:23 +0000)]
Merge "Add bionic-unit-tests-gcc{32,64}, compiled with gcc."

8 years agoMerge "Init stdio in __libc_init_common." am: 6bef152af2
Yabin Cui [Tue, 1 Dec 2015 00:00:50 +0000 (00:00 +0000)]
Merge "Init stdio in __libc_init_common." am: 6bef152af2
am: 1f4b0c44b3

* commit '1f4b0c44b37bbf840a8210c8948e1d6efb0cdc11':
  Init stdio in __libc_init_common.

8 years agoMerge "Enable using clang to build __cxa_thread_atexit_impl." am: af87c9ccfc
Yabin Cui [Tue, 1 Dec 2015 00:00:46 +0000 (00:00 +0000)]
Merge "Enable using clang to build __cxa_thread_atexit_impl." am: af87c9ccfc
am: 4262d3e9ac

* commit '4262d3e9ac2462502875f5a7f1925a44ce29b299':
  Enable using clang to build __cxa_thread_atexit_impl.

8 years agoMerge "Init stdio in __libc_init_common."
Yabin Cui [Mon, 30 Nov 2015 23:58:50 +0000 (23:58 +0000)]
Merge "Init stdio in __libc_init_common."
am: 6bef152af2

* commit '6bef152af2c622ee0c57f9c374b76f3dd352e52b':
  Init stdio in __libc_init_common.

8 years agoMerge "Enable using clang to build __cxa_thread_atexit_impl."
Yabin Cui [Mon, 30 Nov 2015 23:58:41 +0000 (23:58 +0000)]
Merge "Enable using clang to build __cxa_thread_atexit_impl."
am: af87c9ccfc

* commit 'af87c9ccfc3afbc7db9f0bc131d122453b5c882d':
  Enable using clang to build __cxa_thread_atexit_impl.

8 years agoMerge "Init stdio in __libc_init_common."
Yabin Cui [Mon, 30 Nov 2015 23:57:02 +0000 (23:57 +0000)]
Merge "Init stdio in __libc_init_common."

8 years agoMerge "Enable using clang to build __cxa_thread_atexit_impl."
Yabin Cui [Mon, 30 Nov 2015 23:56:41 +0000 (23:56 +0000)]
Merge "Enable using clang to build __cxa_thread_atexit_impl."

8 years agoEnable using clang to build __cxa_thread_atexit_impl.
Yabin Cui [Mon, 30 Nov 2015 22:07:58 +0000 (14:07 -0800)]
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

8 years agoMerge "Don\'t use __thread in __cxa_thread_finalize()." am: 28d3f00cf4
Yabin Cui [Mon, 30 Nov 2015 22:03:39 +0000 (22:03 +0000)]
Merge "Don\'t use __thread in __cxa_thread_finalize()." am: 28d3f00cf4
am: 51ca18d2a1

* commit '51ca18d2a11eedff94a11c1cb996f38c2011b0dd':
  Don't use __thread in __cxa_thread_finalize().

8 years agoMerge "Don\'t use __thread in __cxa_thread_finalize()."
Yabin Cui [Mon, 30 Nov 2015 22:01:36 +0000 (22:01 +0000)]
Merge "Don\'t use __thread in __cxa_thread_finalize()."
am: 28d3f00cf4

* commit '28d3f00cf4545812503c835ea906fa83309e48ed':
  Don't use __thread in __cxa_thread_finalize().

8 years agoMerge "Don't use __thread in __cxa_thread_finalize()."
Yabin Cui [Mon, 30 Nov 2015 21:59:47 +0000 (21:59 +0000)]
Merge "Don't use __thread in __cxa_thread_finalize()."

8 years agoInit stdio in __libc_init_common.
Yabin Cui [Tue, 24 Nov 2015 23:37:06 +0000 (15:37 -0800)]
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

8 years agoMerge "Fix pthread_test according to tsan report." am: aec13988da
Yabin Cui [Mon, 30 Nov 2015 21:45:01 +0000 (21:45 +0000)]
Merge "Fix pthread_test according to tsan report." am: aec13988da
am: 6ac2fdd0f4

* commit '6ac2fdd0f4926a3d5c8e1424c4cdf5d82805c288':
  Fix pthread_test according to tsan report.

8 years agoMerge "Fix pthread_test according to tsan report."
Yabin Cui [Mon, 30 Nov 2015 21:42:42 +0000 (21:42 +0000)]
Merge "Fix pthread_test according to tsan report."
am: aec13988da

* commit 'aec13988dab7ff32cb005f42b952e3b9b55a4779':
  Fix pthread_test according to tsan report.

8 years agoMerge "Fix pthread_test according to tsan report."
Yabin Cui [Mon, 30 Nov 2015 21:38:59 +0000 (21:38 +0000)]
Merge "Fix pthread_test according to tsan report."

8 years agoMerge "Consider when building libc_thread_atexit_impl module" am: 2bb85c848a
Chih-hung Hsieh [Mon, 30 Nov 2015 19:04:41 +0000 (19:04 +0000)]
Merge "Consider  when building libc_thread_atexit_impl module" am: 2bb85c848a
am: 4f94b7bfc0

* commit '4f94b7bfc082cd6f52d02a789512d1e6a6a01af6':
  Consider $(use_clang) when building libc_thread_atexit_impl module

8 years agoMerge "Consider when building libc_thread_atexit_impl module"
Chih-hung Hsieh [Mon, 30 Nov 2015 19:02:05 +0000 (19:02 +0000)]
Merge "Consider  when building libc_thread_atexit_impl module"
am: 2bb85c848a

* commit '2bb85c848abb89951ec01342d6c8278311346395':
  Consider $(use_clang) when building libc_thread_atexit_impl module

8 years agoMerge "Consider $(use_clang) when building libc_thread_atexit_impl module"
Chih-hung Hsieh [Mon, 30 Nov 2015 18:58:59 +0000 (18:58 +0000)]
Merge "Consider $(use_clang) when building libc_thread_atexit_impl module"

8 years agoAdd bionic-unit-tests-gcc{32,64}, compiled with gcc.
Chih-Hung Hsieh [Fri, 20 Nov 2015 22:13:24 +0000 (14:13 -0800)]
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

8 years agoConsider $(use_clang) when building libc_thread_atexit_impl module
Nikola Veljkovic [Wed, 25 Nov 2015 18:03:12 +0000 (19:03 +0100)]
Consider $(use_clang) when building libc_thread_atexit_impl module

Change-Id: Ia369d94979f418198a2ee891385942d9bc5604d7

8 years agoDon't use __thread in __cxa_thread_finalize().
Yabin Cui [Wed, 25 Nov 2015 01:24:06 +0000 (17:24 -0800)]
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

8 years agoMerge "Remove cflags and ldflags from crt defaults" am: a01108d9bf
Colin Cross [Tue, 24 Nov 2015 21:44:59 +0000 (21:44 +0000)]
Merge "Remove cflags and ldflags from crt defaults" am: a01108d9bf
am: a36d1e0d31

* commit 'a36d1e0d31727d645d0f6b162489eecb8e8e2f22':
  Remove cflags and ldflags from crt defaults

8 years agoMerge "Remove cflags and ldflags from crt defaults"
Colin Cross [Tue, 24 Nov 2015 21:41:22 +0000 (21:41 +0000)]
Merge "Remove cflags and ldflags from crt defaults"
am: a01108d9bf

* commit 'a01108d9bf415854b9d36334483133adff3d7405':
  Remove cflags and ldflags from crt defaults

8 years agoMerge "Remove cflags and ldflags from crt defaults"
Colin Cross [Tue, 24 Nov 2015 21:33:54 +0000 (21:33 +0000)]
Merge "Remove cflags and ldflags from crt defaults"

8 years agoMerge "move arch variant structs down a level" am: 8bd27182c5
Colin Cross [Tue, 24 Nov 2015 20:27:47 +0000 (20:27 +0000)]
Merge "move arch variant structs down a level" am: 8bd27182c5
am: 912e27a4b2

* commit '912e27a4b255e85546bf64fc1f3e68398525ff1c':
  move arch variant structs down a level

8 years agoMerge "move arch variant structs down a level"
Colin Cross [Tue, 24 Nov 2015 20:24:24 +0000 (20:24 +0000)]
Merge "move arch variant structs down a level"
am: 8bd27182c5

* commit '8bd27182c505cdc8031ab23fea5d1dccb6b7405a':
  move arch variant structs down a level

8 years agoMerge "move arch variant structs down a level"
Colin Cross [Tue, 24 Nov 2015 20:21:20 +0000 (20:21 +0000)]
Merge "move arch variant structs down a level"

8 years agoRemove cflags and ldflags from crt defaults
Colin Cross [Mon, 23 Nov 2015 22:12:19 +0000 (14:12 -0800)]
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

8 years agoMerge "Introduce anonymous namespace" am: db8caa740a
Dimitry Ivanov [Tue, 24 Nov 2015 02:58:19 +0000 (02:58 +0000)]
Merge "Introduce anonymous namespace" am: db8caa740a
am: 321314f2e9

* commit '321314f2e90d33ef6a653080784754d483bb6d44':
  Introduce anonymous namespace

8 years agoMerge "Introduce anonymous namespace"
Dimitry Ivanov [Tue, 24 Nov 2015 02:45:14 +0000 (02:45 +0000)]
Merge "Introduce anonymous namespace"
am: db8caa740a

* commit 'db8caa740a409c2ce75f875df84857e6be69eb9f':
  Introduce anonymous namespace

8 years agoMerge "Introduce anonymous namespace"
Dimitry Ivanov [Tue, 24 Nov 2015 02:23:34 +0000 (02:23 +0000)]
Merge "Introduce anonymous namespace"

8 years agoIntroduce anonymous namespace
Dmitriy Ivanov [Mon, 23 Nov 2015 19:26:35 +0000 (11:26 -0800)]
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

8 years agomove arch variant structs down a level
Colin Cross [Mon, 23 Nov 2015 22:12:15 +0000 (14:12 -0800)]
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

8 years agoMerge "Change _stdio_handles_locking into _caller_handles_locking." am: 17554356cc
Yabin Cui [Mon, 23 Nov 2015 19:05:48 +0000 (19:05 +0000)]
Merge "Change _stdio_handles_locking into _caller_handles_locking." am: 17554356cc
am: edcee4e401

* commit 'edcee4e4011b1a6e327791493ee1abde3ded2142':
  Change _stdio_handles_locking into _caller_handles_locking.