Commit Graph

10315 Commits

Author SHA1 Message Date
Hans Boehm
c712ceeec4 Make memory_order_acquire visible in global namespace
We were missing that using directive when including <atomic>.

Bug:17736764
Change-Id: Ie8ca92a952749415567bcd5fa21d56629a364660
(cherry picked from commit 76ac4d0853)
2014-10-20 11:41:34 -07:00
The Android Automerger
0f17126b24 merge in lmp-mr1-release history after reset to 59a02860a4 2014-10-20 06:08:44 -07:00
The Android Automerger
eca44bc1f3 merge in lmp-mr1-release history after reset to 59a02860a4 2014-10-19 06:08:38 -07:00
The Android Automerger
99415296ac merge in lmp-mr1-release history after reset to 59a02860a4 2014-10-18 06:09:03 -07:00
The Android Automerger
f020640c09 merge in lmp-mr1-release history after reset to 59a02860a4 2014-10-16 06:09:16 -07:00
The Android Automerger
466c8cbd50 merge in lmp-mr1-release history after reset to 59a02860a4 2014-10-15 06:09:02 -07:00
The Android Automerger
c9b1201be1 merge in lmp-mr1-release history after reset to 59a02860a4 2014-10-14 06:08:58 -07:00
Christopher Ferris
59a02860a4 Merge "Return total footprint, not high water mark." into lmp-mr1-dev 2014-10-13 19:36:56 +00:00
Christopher Ferris
f4ada9c9ce Return total footprint, not high water mark.
The mallinfo usmblks value returned by dlmalloc is a little misleading.
It's not the current max, it's the historical high water mark. This
leads to dumpsys meminfo producing native memory numbers that don't add up.
Change this to the real total footprint, not this high water mark.

Bug: 17265653
Change-Id: Id0293a1b50c9b0be8795405049f537a51ab0e8b7
2014-10-13 12:29:30 -07:00
The Android Automerger
91221be747 merge in lmp-mr1-release history after reset to e0fafb019e 2014-10-13 06:09:12 -07:00
The Android Automerger
d60cda85b9 merge in lmp-mr1-release history after reset to 2f25cf373c 2014-10-12 06:08:41 -07:00
The Android Automerger
50d615236d merge in lmp-mr1-release history after reset to 2f25cf373c 2014-10-11 06:08:51 -07:00
Christopher Ferris
e0fafb019e am c891e240: Add back symbols to fix Greed for Glory franchise.
* commit 'c891e24073830e07ba7373dee554ff2c70e1d313':
  Add back symbols to fix Greed for Glory franchise.
2014-10-10 20:47:00 +00:00
Elliott Hughes
2f25cf373c Fix pthread_attr_getstack under valgrind.
valgrind seems to mess with the stack enough that the kernel will
report "[stack:pid]" rather than "[stack]" in /proc/self/maps, so
switch to the task-specific file instead to force "[stack]". (There
are two conditions in the kernel code that decides which form to
output.)

Bug: 17897476

(cherry picked from commit 9afb2f2106)

Change-Id: I92c331ef6fb5868af49e75bc595710d290a95f5b
2014-10-10 10:57:48 -07:00
Christopher Ferris
c891e24073 Add back symbols to fix Greed for Glory franchise.
Bug: 17813018
Change-Id: Id939426ee5303117b9601e7915fcfec5024fc621
2014-10-09 18:31:01 -07:00
Christopher Ferris
7f4618cbc8 am c9734d24: Re-add dlmalloc for 32 bit.
* commit 'c9734d24d92f4737f5ab3808c77d816a1b084582':
  Re-add dlmalloc for 32 bit.
2014-10-09 22:02:00 +00:00
Christopher Ferris
c9734d24d9 Re-add dlmalloc for 32 bit.
It turns out that appportable has a version that calls dlmalloc directly.
Re-add the dlmalloc symbol for 32 bit only as a compatibility shim that
calls malloc.

Bug: 17881362
Change-Id: I8f20963b0b8d323489dc083e4063779e0d1d7447
2014-10-09 11:10:23 -07:00
The Android Automerger
d67e1d8ae9 merge in lmp-mr1-release history after reset to e5d4fc39e3 2014-10-09 06:08:53 -07:00
The Android Automerger
bc9cee7f58 merge in lmp-mr1-release history after reset to e5d4fc39e3 2014-10-08 06:09:28 -07:00
Elliott Hughes
e5d4fc39e3 am 1543fdf6: Work around a bug in Immersion\'s libImmEmulatorJ.so.
* commit '1543fdf616ddebee7819214437527f380e5c743b':
  Work around a bug in Immersion's libImmEmulatorJ.so.
2014-10-08 05:24:46 +00:00
Dan Albert
55ee845b8e Inline helpers need to be exported unmangled.
__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.

The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.

(cherry-pick of 658727e111 with conflicts
in stdio.h and string.h.)

Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
2014-10-07 18:51:24 -07:00
Nick Kralevich
ce92b41a00 cdefs.h: add artificial attribute to FORTIFY_SOURCE functions
Otherwise the gcc compiler warning doesn't show up.

Add -Wno-error to fortify related tests. Fortify related tests
are expected to be examples of bad programs, and in many
cases shouldn't compile cleanly. Rewriting them to compile
cleanly isn't feasible nor desirable.

Bug: 17784968

(cherry picked from commit 1aaa17802c)

Change-Id: Ib6df1a3f44b55b1fff222e78395c10c51cd39817
2014-10-07 16:37:04 -07:00
Elliott Hughes
1543fdf616 Work around a bug in Immersion's libImmEmulatorJ.so.
This library calls pthread_mutex_lock and pthread_mutex_unlock with a NULL
pthread_mutex_t*. This gives them (and their users) one release to fix things.

Bug: 17443936

(cherry picked from commit 7d3f553f98)

Change-Id: Ie26bbecd3a74d61113b51c18832872499b97ee86
(cherry picked from commit b5e7eba6d1)
2014-10-07 23:17:14 +00:00
Elliott Hughes
b5e7eba6d1 Work around a bug in Immersion's libImmEmulatorJ.so.
This library calls pthread_mutex_lock and pthread_mutex_unlock with a NULL
pthread_mutex_t*. This gives them (and their users) one release to fix things.

Bug: 17443936

(cherry picked from commit 7d3f553f98)

Change-Id: Ie26bbecd3a74d61113b51c18832872499b97ee86
2014-10-07 16:08:46 -07:00
Elliott Hughes
ea8dea8cb7 Merge "Improve <sys/cdefs.h>." into lmp-mr1-dev 2014-10-07 18:51:36 +00:00
Elliott Hughes
d87d401ab1 Improve <sys/cdefs.h>.
Fix and use __RENAME (and lose ___RENAME --- two underscores should be
enough for anybody). This was the point of this change, because I want
to use __RENAME to support the two basename variants and the two
strerror_r variants.

Lose a bunch of macros that weren't being used.

Lose three dead files from the DNS code.

Bug: 17784968

(cherry picked from commit 2cfb4e8e2e)

Change-Id: I5e96146f92c0521248c78c0933bec5e9a9818222
2014-10-07 11:40:09 -07:00
Christopher Ferris
4aace3852d am 2cf15571: am 40bc7cd4: (-s ours) DO NOT MERGE Re-add .save directive for arm assembler code.
* commit '2cf155713aaba451065d593335d544f2ada24ddf':
  DO NOT MERGE  Re-add .save directive for arm assembler code.
2014-10-07 17:42:39 +00:00
Christopher Ferris
2cf155713a am 40bc7cd4: (-s ours) DO NOT MERGE Re-add .save directive for arm assembler code.
* commit '40bc7cd4ed9fb848a7b3d934f69669f64ceed707':
  DO NOT MERGE  Re-add .save directive for arm assembler code.
2014-10-07 15:27:36 +00:00
The Android Automerger
f51bbbe319 merge in lmp-mr1-release history after reset to 6c4e16f634 2014-10-07 06:08:55 -07:00
Elliott Hughes
6c4e16f634 Merge "further cleanup memcpy fortify implementation" into lmp-mr1-dev 2014-10-07 00:30:34 +00:00
Christopher Ferris
27355affc1 am d11eac34: Force export symbols on all x86 variants in libc.
* commit 'd11eac3455a059a092ceee92eda9905e1d661e94':
  Force export symbols on all x86 variants in libc.
2014-10-07 00:20:10 +00:00
Nick Kralevich
db408bf421 further cleanup memcpy fortify implementation
Bug: 17784968

(cherry picked from commit b84f667e93)

Change-Id: I68fc2cc0a1ee7f0887edf3681eb83ef678de1383
2014-10-06 16:18:32 -07:00
Christopher Ferris
d11eac3455 Force export symbols on all x86 variants in libc.
For silvermont, the __popcountsi2 symbol does not get exported by libc.
But for atom, this symbol is exported. Since we already exported this symbol
for previous releases, it's better to just follow through and force
the export, but only for 32 bit. x86 64 bit will not export this symbol.

Bug: 17681440
Change-Id: I6c62245f0960910f64baaaf6d9d090bf3ea5f435
2014-10-06 15:51:26 -07:00
Nick Kralevich
7ad2147a08 string.h: remove unused variable
(cherry picked from commit 48be71d02b)

Bug: 17784968
Change-Id: Iac7732fb4f7fe42977cb9f62472bb636e17e5232
2014-10-06 10:17:01 -07:00
The Android Automerger
26df9bf109 merge in lmp-mr1-release history after reset to 02542b3bbd 2014-10-06 06:08:57 -07:00
The Android Automerger
4877fe15c2 merge in lmp-mr1-release history after reset to 02542b3bbd 2014-10-05 06:08:48 -07:00
Alex Van Brunt
02542b3bbd am a5087148: Reimplement clock(3) using clock_gettime(3)
* commit 'a508714800242b294291060641ed35d719bdc857':
  Reimplement clock(3) using clock_gettime(3)
2014-10-04 16:44:11 +00:00
The Android Automerger
975164af3c merge in lmp-mr1-release history after reset to 22f5a61d95 2014-10-04 06:09:07 -07:00
Alex Van Brunt
a508714800 Reimplement clock(3) using clock_gettime(3)
Unlike times(), clock_gettime() is implemented as a vDSO on many architectures.
So, using clock_gettime() will return a more accurate time and do so with less
overhead because it does have the overhead of calling into the kernel.

It is also significantly more accurate because it measures the actual time in
nanoseconds rather than the number of ticks (typically 1 millisecond or more).

Bug: 17814435

(cherry picked from commit 8d0b2dbf21)

Change-Id: Id4945d9f387330518f78669809639952e9227ed9
2014-10-03 19:05:52 -07:00
Elliott Hughes
22f5a61d95 am ea9800e9: Explain why clock(3) isn\'t broken.
* commit 'ea9800e98598c71fe76c4e2a0d0498b6bd490a83':
  Explain why clock(3) isn't broken.
2014-10-04 00:06:27 +00:00
Elliott Hughes
ea9800e985 Explain why clock(3) isn't broken.
Bug: 17441123
Bug: 17814435

(cherry picked from commit f83c208b82)

Change-Id: I2065afe73b79a8d86404edee16e983625d902cdc
2014-10-03 16:46:20 -07:00
Ningsheng Jian
04f5f4100c Fix gdb could not get shared library list issue
Get dynamic flags from phdr table's correct entry rather the first
entry, so that the following DT_DEBUG entry can be set.

Also fix the undefined reference to LoadTask::deleter issue under gcc
-O0 option.

Bug: 17524778

(cherry picked from commit e93be99da0)

Change-Id: I347792dab25c7b19c3fc690e03d20899ce1e26e0
2014-10-02 15:35:47 -07:00
The Android Automerger
1f5a9a4b35 merge in lmp-mr1-release history after reset to e4f8962ab5 2014-10-02 06:09:27 -07:00
Dmitriy Ivanov
1cd0c6777f L-MR1 specific fixes
Reset soinfo version to 0.
 Disable ifunc test for arm64 because of old toolchain
 in lmp-mr1-dev branch

 Note: this commit should be reverted in -plus-aosp branch.

Change-Id: I2d6d996d43bc35d5d4975c745779f43a988b31e6
2014-10-01 16:26:49 -07:00
Dmitriy Ivanov
7d971ec14b Fix unload of recursively linked library
Expanded test for recursive libs. Fixed bug with unnecessary
  soinfo_free of already loaded library.

(cherry picked from commit a6ac54a215)

Change-Id: I6907c723d9fbdf6b2777f3f236b1e29b0843edd6
2014-10-01 16:04:58 -07:00
Dmitriy Ivanov
f4cb631364 Add IFUNC support for arm64 and IRELATIVE reloc
There are number of changes in the way IFUNC related relocations are done:
 1. IRELATIVE relocations are now supported for x86/x86_64 and arm64.
 2. IFUNC relocations are now relying on static linker to generate
    them in correct order - this removes necessety of additional
    relocation pass for ifuncs.
 3. Related to 2: rela?.dyn relocations are preformed before .plt ones.
 4. Ifunc are resolved on symbol lookup this approach allowed to avoid
    mprotect(PROT_WRITE) call on r-x program segments.

Bug: 17399706
Bug: 17177284

(cherry picked from commit 9aea164457)

Change-Id: Ie19d900fc203beb93faf8943b0d06d534a6de4ad
2014-10-01 16:04:31 -07:00
Dmitriy Ivanov
ef1306d777 Refactoring: C++11 style DISABLE_ bionic marcos
Enable the -std=gnu++11 flag for libstdc++ static and
  dynamic libs.

  ScopeGuard uses DISABLE_ macros instead of '= delete';

(cherry picked from commit d9ff722661)

Change-Id: If2573d080770e18b36b56106f2369f7bb682cd3c
2014-10-01 16:03:51 -07:00
Dmitriy Ivanov
61c4147fa8 Reset enviroment for math_tests
Bug: 17390824

(cherry picked from commit 7b956ede3f)

Change-Id: I5d804ceb5e69533584161bfed6787529cd8296fb
2014-10-01 16:03:40 -07:00
Dmitriy Ivanov
ae69a9584b Load libraries in breadth-first order
This patch fixes the problem with symbol search order
  for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
  and ld_preloads in correct order.

Bug: https://code.google.com/p/android/issues/detail?id=74255
Attempt: 2

(cherry picked from commit 14669a939d)

Change-Id: Id87540c96a2242220967b6fa5d84ddcd829e2b97
2014-10-01 16:01:28 -07:00
Dmitriy Ivanov
c0133a73b6 Revert "Load libraries in breadth-first order"
This reverts commit a3ad450a2e.

(cherry picked from commit 498eb18b82)

Change-Id: Iec7eab83d0c0ed1604e1e8ea3f9e9d0ce1d29680
2014-10-01 16:00:52 -07:00