Commit Graph

10658 Commits

Author SHA1 Message Date
Dmitriy Ivanov
a492605849 Implement LinkedList::visit()
Change-Id: Ibd9d133dddf1f2e6e65660e3cd2dacafcc0c84d9
2014-09-02 09:45:40 -07:00
Dmitriy Ivanov
0cd83ebb0e Introduce size-based r/w allocators
Change-Id: I75165fc392e5380124039e6db49b0f559c8a518e
2014-09-01 16:17:05 -07:00
Dmitriy Ivanov
e47b994975 am 5120bcf9: Merge "Look into ld_preloads before current library"
* commit '5120bcf9f11951bffd8ac595c2b70252ed4a4958':
  Look into ld_preloads before current library
2014-09-01 21:36:47 +00:00
Dmitriy Ivanov
e4c4311f44 resolved conflicts for merge of c191a8ad to lmp-dev-plus-aosp
Change-Id: I24dcf9701ebe3344796f757a596754cbefbf358a
2014-09-01 14:34:15 -07:00
Dmitriy Ivanov
a20e37f291 am 11387985: Merge "Erase elements in LinkedList::remove_if"
* commit '11387985d27f7d9794963779c69dcf0056bac43c':
  Erase elements in LinkedList::remove_if
2014-09-01 21:24:50 +00:00
Dmitriy Ivanov
5120bcf9f1 Merge "Look into ld_preloads before current library" 2014-09-01 21:16:42 +00:00
Dmitriy Ivanov
c2048944ff Look into ld_preloads before current library
Change lookup order during relocation so that
 ld_preloads always precede caller (unless caller
 is main executable).

 Asan needs this change in order to intercept libc->libc
 calls.

Bug: 15432753
(cherry picked from commit 05e190c093)

Change-Id: I5bfb58e18015b1ec5b77842dbb37fb122fa1fd1a
2014-09-01 14:14:09 -07:00
Dmitriy Ivanov
c191a8adee Merge "Look into ld_preloads before current library" into lmp-dev 2014-09-01 21:08:55 +00:00
Dmitriy Ivanov
11387985d2 Merge "Erase elements in LinkedList::remove_if" 2014-09-01 21:06:32 +00:00
Elliott Hughes
1a96db3e8e resolved conflicts for merge of b2eb09a9 to lmp-dev-plus-aosp
Change-Id: I0208958d78d6d7bc8c41568aa9abee15605b951e
2014-08-30 22:30:48 -07:00
Hans Boehm
94ea04c50a am e505cc66: Merge "Make stdatomic.h work with gcc4.6 host compiler"
* commit 'e505cc66a6e03f4ba460de3500f8b272421482c1':
  Make stdatomic.h work with gcc4.6 host compiler
2014-08-30 01:25:10 +00:00
Hans Boehm
e505cc66a6 Merge "Make stdatomic.h work with gcc4.6 host compiler" 2014-08-30 00:49:51 +00:00
Dmitriy Ivanov
4bea498544 Erase elements in LinkedList::remove_if
Change-Id: I5119a78c73ffe780a81c53ab5ff0266d5c82d319
2014-08-29 17:09:24 -07:00
Hans Boehm
32429606bf Make stdatomic.h work with gcc4.6 host compiler
This is needed to make L work correctly, and bionic tests pass
again, after applying the equivalent of
commit 00aaea3645 there.

It makes the preexisting code that uses __sync implementations
much more useful, although we should no longer be exercising that
code in AOSP.

Specifically fixes:

We were invoking __has_extension and __has_builtin for GCC compilations.
They're clang specific. Restructured the tests.

The __sync implementation was not defining the LOCK_FREE macros.

ATOMIC_VAR_INIT was using named field initializations.  These are a
C, not C++, feature, that is not supported by g++ 4.6.

The stdatomic bionic test still failed with 4.6 and glibc with our
questionable LOCK_FREE macro implementation.  Don't run that piece
with 4.6.

In L, this is a prerequisite for fixing:

    Bug:16880454
    Bug:16513433

Change-Id: I9b61e42307f96a114dce7552b6ead4ad1c544eab
2014-08-29 17:03:26 -07:00
Elliott Hughes
e21a624269 am bbe06e0d: Merge "Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc."
* commit 'bbe06e0da1742e9bdc52d3246ffa9f2ab3ce999a':
  Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
2014-08-29 23:30:14 +00:00
Elliott Hughes
b2eb09a9ed Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Bug: 16874785

(cherry picked from commit e0c56efddf)

Change-Id: I9c922ba019f648766fc399d1c4e35e789e25acd4
2014-08-29 16:10:57 -07:00
Elliott Hughes
bbe06e0da1 Merge "Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc." 2014-08-29 23:08:01 +00:00
Elliott Hughes
e0c56efddf Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Bug: 16874785
Change-Id: I8512f8be3fd149d8720c5c3b4657bedd5ce2b1d1
2014-08-29 15:54:11 -07:00
Dmitriy Ivanov
e6f46bfb90 am 83b637fa: Merge "Replace NULL with nullptr"
* commit '83b637fa28e072aa73691b5ddc588293f06cb54b':
  Replace NULL with nullptr
2014-08-29 22:51:53 +00:00
Dmitriy Ivanov
83b637fa28 Merge "Replace NULL with nullptr" 2014-08-29 22:30:07 +00:00
Dmitriy Ivanov
851135bf99 Replace NULL with nullptr
Change-Id: Iad50be617d318ca98883b843229c960ad5b9afa9
2014-08-29 14:13:48 -07:00
Dmitriy Ivanov
05e190c093 Look into ld_preloads before current library
Change lookup order during relocation so that
 ld_preloads always precede caller (unless caller
 is main executable).

 Asan needs this change in order to intercept libc->libc
 calls.

Bug: 15432753
Change-Id: If69aa16efe59aa35bb30e96feb83d08f1efbec86
2014-08-29 11:46:06 -07:00
Elliott Hughes
72dc86ec5f am 1f39afc8: Merge "The host prebuilt glibc is 2.11, so remove workarounds for 2.9."
* commit '1f39afc8d4cf402a8aa46d6cb121c62d289922d3':
  The host prebuilt glibc is 2.11, so remove workarounds for 2.9.
2014-08-29 18:30:59 +00:00
Elliott Hughes
1f39afc8d4 Merge "The host prebuilt glibc is 2.11, so remove workarounds for 2.9." 2014-08-29 18:12:36 +00:00
Chih-Hung Hsieh
46623c1cc7 am cc4259ed: Merge "Ignore all __weak_alias in OpenBSD libC."
* commit 'cc4259ed9254ae66f63cacc3ad50963c4058eb1c':
  Ignore all __weak_alias in OpenBSD libC.
2014-08-29 11:39:56 +00:00
Elliott Hughes
cd6657f9ea am 29f06943: Merge "Add GNU-compatible strerror_r."
* commit '29f06943a19ef2271a08f4223f597a3383f0d9c0':
  Add GNU-compatible strerror_r.
2014-08-29 11:39:55 +00:00
Chih-Hung Hsieh
cc4259ed92 Merge "Ignore all __weak_alias in OpenBSD libC." 2014-08-29 03:10:44 +00:00
Elliott Hughes
f6824b26ae The host prebuilt glibc is 2.11, so remove workarounds for 2.9.
Change-Id: I1072fcebc8b3018580a9d069fe6eca9c4e74e865
2014-08-28 19:28:35 -07:00
Elliott Hughes
29f06943a1 Merge "Add GNU-compatible strerror_r." 2014-08-29 02:26:34 +00:00
Elliott Hughes
416d7ddaff Add GNU-compatible strerror_r.
We already had the POSIX strerror_r, but some third-party code defines
_GNU_SOURCE and expects to get the GNU strerror_r instead.

This exposed a bug in the libc internal logging functions where unlike
their standard brethren they wouldn't return the number of bytes they'd
have liked to have written.

Bug: 16243479
Change-Id: I1745752ccbdc569646d34f5071f6df2be066d5f4
2014-08-28 16:37:09 -07:00
Chih-Hung Hsieh
b6b5cb5389 Ignore all __weak_alias in OpenBSD libC.
GCC assembler allows xyz to be redeclared as weak,
by __weak_alias(xyz, _xyz), while _xyz is undefined.
Clang does not like that but silently generates no code.
It will reject its own .s file if the assembly code is saved first.
Since we have no reason to define xyz or _xyz as weak symbol now,
and _xyz is a macro to xyz, we simplify libC to have only
xyz defined as global.

BUG: 17186746
Change-Id: I24b154425838683cae69248cc750c59e26fd5467
2014-08-28 15:10:01 -07:00
Elliott Hughes
eceb417d28 am 67f1f3b1: Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
* commit '67f1f3b171ecd5f68f51465bbe4b8c8440bb6b2e':
  Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
2014-08-28 03:37:22 +00:00
Elliott Hughes
0019c7b5a0 resolved conflicts for merge of a0eeb0b6 to lmp-dev-plus-aosp
Change-Id: I84193689c0d6a9ee70b8da3c509694eb6d747d4a
2014-08-27 20:03:04 -07:00
Elliott Hughes
9560aaba8f am f4e721dd: Merge "Have pthread_attr_getstack for the main thread report RLIMIT_STACK..."
* commit 'f4e721dd519db89c504c8944763811a3df956b32':
  Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
2014-08-28 00:00:07 +00:00
Elliott Hughes
67f1f3b171 Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
...rather than just what's already mapped in. This seems somewhat
contrary to POSIX's "All pages within the stack described by stackaddr
and stacksize shall be both readable and writable by the thread", but
it's what glibc does.

Bug: 17111575

(cherry picked from commit 9e4ffa7032)

Change-Id: I73f219a569917b2e4546c09436d7ef5231facc07
2014-08-27 16:50:53 -07:00
Elliott Hughes
a0eeb0b69f Merge "Fix pthread_getattr_np for the main thread." into lmp-dev 2014-08-27 23:49:56 +00:00
Elliott Hughes
f4e721dd51 Merge "Have pthread_attr_getstack for the main thread report RLIMIT_STACK..." 2014-08-27 23:43:27 +00:00
Christopher Ferris
5f6bab1ac2 am af9da4a3: Merge "Replace snprintf calls in linker."
* commit 'af9da4a343d8fe2456e9d861bbd75bba67f2193c':
  Replace snprintf calls in linker.
2014-08-27 23:41:56 +00:00
Christopher Ferris
af9da4a343 Merge "Replace snprintf calls in linker." 2014-08-27 23:29:18 +00:00
Chih-Hung Hsieh
2c449617c3 am fbe9d3df: Merge "Fix strlen function type for mips."
* commit 'fbe9d3dfeb0e09c0e4aa3221aace8249c0efe881':
  Fix strlen function type for mips.
2014-08-27 23:24:27 +00:00
Chih-Hung Hsieh
fbe9d3dfeb Merge "Fix strlen function type for mips." 2014-08-27 23:09:30 +00:00
Christopher Ferris
052fa3a34c Replace snprintf calls in linker.
When enabling debug malloc, the snprintf calls in the linker fails to
update the buffer.

The problem is that snprintf makes a call to pthread_getspecific that
returns a valid pointer, but the data it points to is zero. This should
never happen and causes the snprintf to stop and do nothing.

Temporarily replace snprintf with a different implementation to work
around this issue.

Bug: 16874447
Bug: 17302493

(cherry pick from commit 172955a4e3)

Change-Id: Idca9d417978403d61debfd0434aaa82fd770f33b
2014-08-27 16:01:57 -07:00
Chih-Hung Hsieh
15b914c8f3 Fix strlen function type for mips.
Clang complains about incompatible-library-redeclaration.

BUG: 17302369
Change-Id: I3ae36f24846408c6464b84b5bddb1747e1e4a971
2014-08-27 16:00:46 -07:00
Yigit Boyar
80f47ca35c Merge branch 'lmp-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/bionic into lmp-dev-plus-aosp 2014-08-27 23:00:12 +00:00
Christopher Ferris
04f12ef91c am 598d25bf: Merge "Replace snprintf calls in linker." into lmp-dev
* commit '598d25bf78fa632e70cb80d4033572328f5bd1b7':
  Replace snprintf calls in linker.
2014-08-27 23:00:10 +00:00
Chih-Hung Hsieh
e561e5db73 am 4f8268e3: Merge "Replace ambiguous cmp instruction with cmpl."
* commit '4f8268e38f151724722bcb489c32185a93fd86ba':
  Replace ambiguous cmp instruction with cmpl.
2014-08-27 23:00:09 +00:00
Chih-Hung Hsieh
4f8268e38f Merge "Replace ambiguous cmp instruction with cmpl." 2014-08-27 22:46:07 +00:00
Christopher Ferris
598d25bf78 Merge "Replace snprintf calls in linker." into lmp-dev 2014-08-27 22:42:11 +00:00
Elliott Hughes
9e4ffa7032 Have pthread_attr_getstack for the main thread report RLIMIT_STACK...
...rather than just what's already mapped in. This seems somewhat
contrary to POSIX's "All pages within the stack described by stackaddr
and stacksize shall be both readable and writable by the thread", but
it's what glibc does.

Bug: 17111575
Change-Id: If9e2dfad9a603c0d0615a8123aacda4946e95b2c
2014-08-27 15:32:01 -07:00
Christopher Ferris
172955a4e3 Replace snprintf calls in linker.
When enabling debug malloc, the snprintf calls in the linker fails to
update the buffer.

The problem is that snprintf makes a call to pthread_getspecific that
returns a valid pointer, but the data it points to is zero. This should
never happen and causes the snprintf to stop and do nothing.

Temporarily replace snprintf with a different implementation to work
around this issue.

Bug: 16874447
Bug: 17302493
Change-Id: I7a500f28adf153150cf2812fae745ff41f1c48d3
2014-08-27 15:30:43 -07:00