Commit Graph

5424 Commits

Author SHA1 Message Date
Christopher Ferris
bc8745cc3d am 8f41d3d3: Merge "Fix generic __memcpy_chk implementation."
* commit '8f41d3d3bc7cf2375e5dd9202da619fd67a5928f':
  Fix generic __memcpy_chk implementation.
2014-10-20 18:38:27 +00:00
Christopher Ferris
8f41d3d3bc Merge "Fix generic __memcpy_chk implementation." 2014-10-20 18:21:22 +00:00
Chih-Hung Hsieh
042319b908 am 9a740482: Merge "Add -no-integrated-as at local level."
* commit '9a7404824b3dfaad6ba14a41aab5f14132392a92':
  Add -no-integrated-as at local level.
2014-10-20 17:02:32 +00:00
Chih-Hung Hsieh
a371750681 Add -no-integrated-as at local level.
Later we will enable integrated-as as default at the global level.

BUG: 17820427
BUG: 17302991
Change-Id: I233204ca04d7222b2cb1fbd0fa48a482f8b63f6f
2014-10-20 09:09:25 -07:00
Christopher Ferris
7123d4371a Fix generic __memcpy_chk implementation.
- Clean up the labels (add .L to make them local).
- Change to using cfi directives.
- Fix unwinding of the __memcpy_chk fail path.

Bug: 18033671
Change-Id: I12845f10c7ce5e6699c15c558bda64c83f6a392a
2014-10-17 14:44:36 -07:00
Dan Albert
96def860ae am 90aa7e37: Merge "Only use <atomic> for C++11 and newer."
* commit '90aa7e374f9000577cde64c4fb88c5dab8dac62e':
  Only use <atomic> for C++11 and newer.
2014-10-16 16:27:37 +00:00
Dan Albert
3ce0769aa5 Only use <atomic> for C++11 and newer.
Any pre-C++11 clients of stdatomic.h that use libc++ are being forced
over to <atomic>, which they don't have the language support to use.

Change-Id: I62445c1f2541410a1569498c09433c7196635537
2014-10-16 07:52:51 -07:00
Dan Albert
8d87796d19 am 71cbcdcf: Merge "We don\'t actually need all of libc++ here."
* commit '71cbcdcf947835076241b9dd72099f28997eb290':
  We don't actually need all of libc++ here.
2014-10-15 20:10:06 +00:00
Dan Albert
71cbcdcf94 Merge "We don't actually need all of libc++ here." 2014-10-15 19:59:09 +00:00
Dan Albert
a7c2e0bad6 We don't actually need all of libc++ here.
All we're actually interested in is the unwinder. Since that's now a
separate library, just use that.

Change-Id: If86071a0d850da961336a58147b70369ace7bd12
2014-10-14 14:19:34 -07:00
Elliott Hughes
2476691632 am 97df16ba: Merge "Add clock_settime and clock_nanosleep."
* commit '97df16ba5c2911e06d1211781a5724706abd227b':
  Add clock_settime and clock_nanosleep.
2014-10-14 03:26:03 +00:00
Haruki Hasegawa
1816025684 Add clock_settime and clock_nanosleep.
Add the missing prototypes, fix the existing prototypes to use clockid_t
rather than int, fix clock_nanosleep's failure behavior, and add simple
tests.

Bug: 17644443
Bug: https://code.google.com/p/android/issues/detail?id=77372
Change-Id: I03fba369939403918abcabae9551a7123953d780
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
2014-10-13 17:04:10 -07:00
Dmitriy Ivanov
951e582c68 am c2297050: Merge "Add glibc alias for NT_PRFPREG"
* commit 'c229705051c8b6a06ad81c221ca74ef9aa743e13':
  Add glibc alias for NT_PRFPREG
2014-10-13 22:15:39 +00:00
Christopher Ferris
737b6581c2 am 083769a3: Merge "Return total footprint, not high water mark."
* commit '083769a3dffabfb968a03a700b9f2fd7838bcf75':
  Return total footprint, not high water mark.
2014-10-13 22:10:03 +00:00
Dan Albert
c01a38622a am 94571f9a: Merge "Use LOCAL_CXX_STL to select libc++_static."
* commit '94571f9ade03cfe24bff1bddc4d6c1a320b39b8e':
  Use LOCAL_CXX_STL to select libc++_static.
2014-10-13 22:10:00 +00:00
Dmitriy Ivanov
c229705051 Merge "Add glibc alias for NT_PRFPREG" 2014-10-13 22:08:52 +00:00
Dmitriy Ivanov
a6bee4df4c Add glibc alias for NT_PRFPREG
Also fix comment style for DF_1_ constants

Change-Id: I7c3ed1d834f0a2b85ee8cc8016c79020955084f8
2014-10-13 15:03:27 -07:00
Christopher Ferris
fee09e556f 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

(cherry pick from commit f4ada9c9ce)

Change-Id: I2fba10285859dccfe8331063c9be14cc169f2d91
2014-10-13 12:45:35 -07:00
Dan Albert
90a29db0f4 Use LOCAL_CXX_STL to select libc++_static.
Directly adding the library to LOCAL_STATIC_LIBRARIES thwarts a few
build system checks.

Change-Id: Ib23c43badfa85de21c691f79ccdcc2cbe2a89b33
2014-10-13 11:20:29 -07:00
Christopher Ferris
472c21b437 am 62a665a6: Merge "Add back symbols to fix Greed for Glory franchise."
* commit '62a665a605df64a6ea5ac680bb564ad7a5f03711':
  Add back symbols to fix Greed for Glory franchise.
2014-10-10 06:38:26 +00:00
Christopher Ferris
78ba823033 Add back symbols to fix Greed for Glory franchise.
Bug: 17813018

(cherry picked from commit c891e24073)

Change-Id: I4e891c2dbad9ea00d2377c5175317d9ae3840153
2014-10-09 22:23:50 -07:00
Elliott Hughes
a852bb56e8 am e9c216fc: Merge "Fix pthread_attr_getstack under valgrind."
* commit 'e9c216fca56e84b0d0a96f7d5e3c99d3276ef071':
  Fix pthread_attr_getstack under valgrind.
2014-10-09 22:10:37 +00:00
Elliott Hughes
9afb2f2106 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
Change-Id: Iff85ceb6d52e8716251fab4e45d95a27184c5529
2014-10-09 14:01:47 -07:00
Christopher Ferris
95296d4129 am d0944d9e: Merge "Re-add dlmalloc for 32 bit."
* commit 'd0944d9ed38be0d74c3d8876f0f36b9ddc0ce38c':
  Re-add dlmalloc for 32 bit.
2014-10-09 18:59:43 +00:00
Christopher Ferris
f183f95946 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

(cherry pick commit from c9734d24d9)

Change-Id: Iee9a777f66a1edb407d7563a60792b767ac4f83a
2014-10-09 11:47:01 -07:00
Dan Albert
b9122b73bf am 8a7f8387: Merge "Use snprintf(3) instead of sprintf(3)."
* commit '8a7f8387b3b95de2ee0c42e34a226a1fcc066896':
  Use snprintf(3) instead of sprintf(3).
2014-10-09 00:40:24 +00:00
Dan Albert
a2220ffb74 am 72d72d91: Merge "Replace uses of sprintf(3) with snprintf(3)."
* commit '72d72d91262fabe6bc169618ef3acb0721441cf0':
  Replace uses of sprintf(3) with snprintf(3).
2014-10-09 00:13:06 +00:00
Dan Albert
ca75f9cdeb Use snprintf(3) instead of sprintf(3).
This change should probably be made upstream as well, but they have a
note about not using it because it isn't available on all systems.

Change-Id: I6d8404c031bd2f486532ced55d94bbb4a4cd2e71
2014-10-08 17:10:26 -07:00
Dan Albert
72d72d9126 Merge "Replace uses of sprintf(3) with snprintf(3)." 2014-10-08 23:44:48 +00:00
Dan Albert
cfd8c45725 Replace uses of sprintf(3) with snprintf(3).
At -00, the compiler warns about sprintf(3), and it is promoted to an
error by -Werror.

Change-Id: Ibb380d27d7eb09dda8ac785be2478d656b379190
2014-10-08 16:12:27 -07:00
Elliott Hughes
9a96ca3ec4 am 0511534d: Merge "Don\'t silently return EINVAL for a NULL sem_t*."
* commit '0511534dcbb00f26b2fd6209b1b60a3263bf042c':
  Don't silently return EINVAL for a NULL sem_t*.
2014-10-08 22:49:21 +00:00
Elliott Hughes
75129ae9f3 Don't silently return EINVAL for a NULL sem_t*.
Bug: 17571197
Change-Id: Ied31d8de87fc10d20dc338be0457e9a4ddb9a0a5
2014-10-08 15:11:44 -07:00
Elliott Hughes
b559513e08 am 5a3ca374: Merge "Revert "Work around a bug in Immersion\'s libImmEmulatorJ.so.""
* commit '5a3ca374583f7605672d9e8f9098011de240f7c4':
  Revert "Work around a bug in Immersion's libImmEmulatorJ.so."
2014-10-08 16:49:35 +00:00
Elliott Hughes
5a3ca37458 Merge "Revert "Work around a bug in Immersion's libImmEmulatorJ.so."" 2014-10-08 16:40:58 +00:00
Dan Albert
6c4a64e3e2 am c9e4f2de: Merge "Inline helpers need to be exported unmangled."
* commit 'c9e4f2de0a92ebf6dec336f383ba172efe1bb366':
  Inline helpers need to be exported unmangled.
2014-10-08 00:12:32 +00:00
Dan Albert
c9e4f2de0a Merge "Inline helpers need to be exported unmangled." 2014-10-08 00:01:08 +00:00
Dan Albert
658727e111 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.

Bug: 17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
2014-10-07 16:46:47 -07:00
Elliott Hughes
3d773274ad Revert "Work around a bug in Immersion's libImmEmulatorJ.so."
This reverts commit 7d3f553f98.

Change-Id: I8909b6aa1d97e9a61dbe95a2d91b9fbe336b58f0
2014-10-07 23:31:06 +00:00
Elliott Hughes
e698a7b5cf am e8d9057e: Merge "Work around a bug in Immersion\'s libImmEmulatorJ.so."
* commit 'e8d9057e3005f6f53f8ef2e876b43aea7a892292':
  Work around a bug in Immersion's libImmEmulatorJ.so.
2014-10-07 23:20:57 +00:00
Elliott Hughes
7d3f553f98 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
Change-Id: I3b63c9a3dd63db0833f21073e323b3236a13b47a
2014-10-07 16:02:11 -07:00
Dan Albert
7c955d7797 am eeb9aa02: Merge "Use snprintf instead of sprintf."
* commit 'eeb9aa02b7f307a1d9b80731dd69ef9dd2f47e47':
  Use snprintf instead of sprintf.
2014-10-07 18:46:32 +00:00
Dan Albert
b0fd55608e Use snprintf instead of sprintf.
At -O0, the attribute warning on sprintf is actually triggered (why
doesn't this happen with -Os?!) and promoted to an error by -Werror.
asctime64_r() is a non-standard function, but the IBM docs state that
the buffer is assumed to be at least 26 characters wide, and the
format string does limit to that (assuming a 4 digit year, also
defined by the IBM docs).

http://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxbd00/asctimer.htm

Change-Id: I1c884474a769aa16c53e985c3d8d694c478c1189
2014-10-07 11:28:47 -07:00
Christopher Ferris
6869d26ad9 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

(cherry picked from commit d11eac3455)

Change-Id: I93704c721d98d569922f606f214069bda24872ba
2014-10-06 16:41:46 -07:00
Christopher Ferris
9a7d31eb9c Merge "resolved conflicts for merge of d11eac34 to lmp-dev-plus-aosp" into lmp-dev-plus-aosp 2014-10-06 23:32:53 +00:00
Christopher Ferris
d61d2b7b80 resolved conflicts for merge of d11eac34 to lmp-dev-plus-aosp
Change-Id: I3cd9056d5d689b783f4afa870397ad4d9de357f5
2014-10-06 16:30:45 -07:00
Nick Kralevich
2d04b5e09f am b5cba608: Merge "cdefs.h: add artificial attribute to FORTIFY_SOURCE functions"
* commit 'b5cba6081bc9179d3ea2aa1bfd77dd8de1c88525':
  cdefs.h: add artificial attribute to FORTIFY_SOURCE functions
2014-10-06 23:29:04 +00: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
1aaa17802c 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
Change-Id: I93bececa7444d965f18c7c27d46e7abce5c49a02
2014-10-06 15:11:52 -07:00
Dmitriy Ivanov
47388d8297 am 6d569b92: Merge "Add file_offset parameter to android_extinfo"
* commit '6d569b92012543a297dccf2dfeaa648d07b3c133':
  Add file_offset parameter to android_extinfo
2014-10-06 17:28:54 +00:00
Dmitriy Ivanov
6d569b9201 Merge "Add file_offset parameter to android_extinfo" 2014-10-06 17:19:39 +00:00