Commit Graph

10307 Commits

Author SHA1 Message Date
Elliott Hughes
3164805b2e am 2be1be47: Revert "Add a hack to <stdlib.h> until we can fix libvpx."
* commit '2be1be47aa9b63568fe6ce1e0a4029b37d90764d':
  Revert "Add a hack to <stdlib.h> until we can fix libvpx."
2014-07-28 23:50:42 +00:00
Dmitriy Ivanov
18358f0e67 am 337c0cef: Merge "Fix \'adb shell /system/bin/linker\' crash"
* commit '337c0cefdc4667143a1f4f2c30113b452c5d188f':
  Fix 'adb shell /system/bin/linker' crash
2014-07-28 23:45:07 +00:00
Elliott Hughes
63b5e167ad am 78e4f8fe: syscall(3)\'s return type should be long.
* commit '78e4f8fed2c162f8ada55180e48487ef2180cf93':
  syscall(3)'s return type should be long.
2014-07-28 23:21:28 +00:00
Elliott Hughes
2be1be47aa Revert "Add a hack to <stdlib.h> until we can fix libvpx."
This reverts commit 3fb5097a7e.
libvpx is now fixed.

Bug: 15598056
Change-Id: Icca974e667f92206505f484bd291726eb0150f68
2014-07-28 16:16:38 -07:00
Elliott Hughes
a032277bb4 am 8a2ecf86: Merge "syscall(3)\'s return type should be long."
* commit '8a2ecf868feebaa39caddc6cdf9500b5385651f0':
  syscall(3)'s return type should be long.
2014-07-28 22:47:57 +00:00
Christopher Ferris
4ad5066e1d Merge "Use libunwindbacktrace for debug malloc code." 2014-07-28 22:45:44 +00:00
Christopher Ferris
861c0ef37b Use libunwindbacktrace for debug malloc code.
Create a method of disabling the debug allocation code paths so that
it's possible to use the libunwindbacktrace library without any
modifications.

Use this path to create and destroy the maps for the process. It's not
stricly necessary in the init code since the symbols are not modified
until after the initialize calls.

Also, remove the debug_XXX source files that doesn't need to be in libc.so.

Fix the maps reading code since it was completely broken for 64 bit.

Bug: 16408686

Change-Id: I6b02ef6ce26fdb7a59ad1029e7cbba9accceb704
2014-07-29 18:10:00 -07:00
Elliott Hughes
a7dc7600fe Merge "Fix linkage of grantpt(3)." 2014-07-28 22:45:44 +00:00
Dan Albert
a1a813da81 Merge "Fix mbsrtowcs(3)'s handling of len parameter." into lmp-dev 2014-07-28 22:45:16 +00:00
Elliott Hughes
78e4f8fed2 syscall(3)'s return type should be long.
This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Bug: 16568314

(cherry picked from commit 21972b61ec)

Change-Id: Ifbc424be29e5650ec72a24df25dd35f24fdd5b3c
2014-07-28 15:39:24 -07:00
Elliott Hughes
36666a4d51 am 8c66fd79: Merge "Use vsnprintf(3) in syslog(3)."
* commit '8c66fd798ed5b7cefe1568d9a000d01b69d29dd9':
  Use vsnprintf(3) in syslog(3).
2014-07-28 16:51:57 +00:00
Elliott Hughes
d201486cdb am b1b60c30: Use vsnprintf(3) in syslog(3).
* commit 'b1b60c30bf321c0fc02264b953b5c16c49d34457':
  Use vsnprintf(3) in syslog(3).
2014-07-28 16:47:40 +00:00
Elliott Hughes
b1b60c30bf Use vsnprintf(3) in syslog(3).
It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
2014-07-28 09:33:00 -07:00
Elliott Hughes
4916706cfe Fix linkage of grantpt(3).
Also clean up the implementation of all the pty functions, add tests,
and fix the stub implementations of ttyname(3) and ttyname_r(3).

Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: I0fb36438cd1abf8d4e87c29415f03db9ba13c3c2
2014-07-25 19:55:23 -07:00
Elliott Hughes
a09f2ebb40 am c1a6a725: Remove localtime_tz and strftime_tz.
* commit 'c1a6a7256026431a9ae49ef2a6139ea99410819b':
  Remove localtime_tz and strftime_tz.
2014-07-26 00:36:25 +00:00
Elliott Hughes
c1a6a72560 Remove localtime_tz and strftime_tz.
This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976

(cherry picked from commit 39d903aea9)

Change-Id: Ie278d3e976b7adc77bad5ce795dd4899cfbf3648
2014-07-25 17:28:52 -07:00
Elliott Hughes
e7e5e37ca4 am 1a918d9b: Merge "Remove localtime_tz and strftime_tz."
* commit '1a918d9be83013cdc8e194edf35b5295eba4ab1c':
  Remove localtime_tz and strftime_tz.
2014-07-25 23:26:24 +00:00
Elliott Hughes
d76f4a9b6f am 708c1120: Start hiding "private/bionic_time.h".
* commit '708c11205443cda14cfb21138d441106aa77a5f9':
  Start hiding "private/bionic_time.h".
2014-07-25 23:04:23 +00:00
Elliott Hughes
708c112054 Start hiding "private/bionic_time.h".
Bug: 15765976

(cherry picked from commit 905e6d58aa)

Change-Id: Ic7435308e8b521886f42ac7bf59531924921ea67
2014-07-25 15:24:57 -07:00
Elliott Hughes
4b4ee2fc1b am 50a9630c: Merge "Start hiding "private/bionic_time.h"."
* commit '50a9630cc26cbc1e38e3ddc589f04fa5cd91697b':
  Start hiding "private/bionic_time.h".
2014-07-25 22:21:42 +00:00
Elliott Hughes
17886971ff Merge "Remove declarations for things that don't exist." 2014-07-25 21:16:27 +00:00
Elliott Hughes
f4c1a36a45 Remove declarations for things that don't exist.
The <grp.h> ones prevent gdb from building out of the box.

Change-Id: I0efbffad2215cfcd75b4d442dfc972444b51d97c
2014-07-29 16:57:47 -07:00
Elliott Hughes
52f8271fa9 Merge "Added a bionic systrace class and tracing to pthread_mutex.cpp." 2014-07-25 21:16:27 +00:00
Brigid Smith
a406ee6d5f Added a bionic systrace class and tracing to pthread_mutex.cpp.
bionic_systrace.h contains an implementation of tracing that
can be used with systrace.py and its associated viewer.  pthread_mutex
now uses this tracing to track pthread_mutex contention, which can be
enabled by using the "bionic" command line option to systrace.

Bug: 15116468
Change-Id: I30ed5b377c91ca4c36568a0e647ddf95d4e4a61a
2014-07-28 19:38:08 -07:00
Dmitriy Ivanov
24dcda0f4f Merge "Fix mips/mips64 build" 2014-07-25 21:16:27 +00:00
Dmitriy Ivanov
ed48534718 Fix mips/mips64 build
Add _start entry label to mips/mips64 linker begin.S

Change-Id: Idcdfc3391427b53880650798be0583a7ac022bcc
2014-07-28 21:03:17 -07:00
Dan Albert
9379ce694d Merge "There is no _MIN for unsigned types." into lmp-dev 2014-07-25 21:16:23 +00:00
Dan Albert
8db0ce7050 Merge "__libc_fatal should print a newline to stderr." into lmp-dev 2014-07-25 21:16:23 +00:00
Dan Albert
779fdd7c0d am a4c14fda: Merge "en_US.UTF-8 is also supported."
* commit 'a4c14fda9176678cadb65fb53f503fda6668f8d1':
  en_US.UTF-8 is also supported.
2014-07-25 19:06:44 +00:00
Elliott Hughes
f4fd7cf138 am 123172ae: Merge "[MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS."
* commit '123172ae370fe51e2d1fc26fe0aafa095af52919':
  [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
2014-07-25 01:03:46 +00:00
Dmitriy Ivanov
ceaec0d95c am dbf52ec3: Merge "Fix global variable initialization for linker"
* commit 'dbf52ec37b835973d8f357af2a16694c98894c4d':
  Fix global variable initialization for linker
2014-07-25 01:03:45 +00:00
Elliott Hughes
e7b2b02dec am d6f614a4: Merge "Implement twalk(3), add unit tests."
* commit 'd6f614a4e16b0fcf4a4fba748bf21fc0017d3619':
  Implement twalk(3), add unit tests.
2014-07-25 01:03:33 +00:00
Dmitriy Ivanov
a9b2185bc4 am 65549969: Fix global variable initialization for linker
* commit '65549969488bbce7f5d1b57714ba32c466943470':
  Fix global variable initialization for linker
2014-07-24 23:58:31 +00:00
Dmitriy Ivanov
6554996948 Fix global variable initialization for linker
Linker now calls init functions for itself.

(cherry picked from commit 4151ea73b7)

Change-Id: I3300fe22de8ad8466a5b1c2d551429769a42852d
2014-07-24 16:49:36 -07:00
Raghu Gandham
56152a8b81 am 34b258dd: [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
* commit '34b258dd692951ab2236e134e5520367cda60125':
  [MIPS] Fix atomic_is_lock_free test for mips32. On 32-bit MIPS, 64-bit atomic ops are achieved through locks. So allow the test to fail for atomic_intmax_t on 32-bit MIPS.
2014-07-24 23:46:28 +00:00
Elliott Hughes
d00b2327c5 am b902641d: Implement twalk(3), add unit tests.
* commit 'b902641d7303d2ea24c10f6d6e7ff49e7ee75611':
  Implement twalk(3), add unit tests.
2014-07-24 23:36:16 +00:00
Duane Sand
eb1fbf1781 am 5ade7e3f: [MIPS] Drop soft-fp targets
* commit '5ade7e3f6bb43d419402aab2c7adca2173e2c584':
  [MIPS] Drop soft-fp targets
2014-07-24 23:33:44 +00:00
Raghu Gandham
34b258dd69 [MIPS] Fix atomic_is_lock_free test for mips32.
On 32-bit MIPS, 64-bit atomic ops are achieved through locks.
So allow the test to fail for atomic_intmax_t on 32-bit MIPS.

(cherry picked from commit f1837377d2)

Change-Id: I973d999c31c9ab89b5a7b709beff6486b93408f2
2014-07-24 16:22:02 -07:00
Elliott Hughes
b902641d73 Implement twalk(3), add unit tests.
I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719

(cherry picked from commit 3e424d0a24)

Change-Id: I5882a6b48c80fea8ac6b9c27e7b9de10b202b4ff
2014-07-24 15:14:06 -07:00
Elliott Hughes
d6f614a4e1 Merge "Implement twalk(3), add unit tests." 2014-07-24 22:07:52 +00:00
Elliott Hughes
3e424d0a24 Implement twalk(3), add unit tests.
I've also added insque(3) and remque(3) (from NetBSD because the OpenBSD
ones are currently broken for non-circular lists).

I've not added the three hash table functions that should be in this header
because they operate on a single global hash table and thus aren't likely
to be useful.

Bug: https://code.google.com/p/android/issues/detail?id=73719
Change-Id: I97397a7b921e2e860fd9c8032cafd9097380498a
2014-07-24 14:55:29 -07:00
Elliott Hughes
8a2ecf868f Merge "syscall(3)'s return type should be long." 2014-07-24 20:55:36 +00:00
Elliott Hughes
21972b61ec syscall(3)'s return type should be long.
This doesn't require us to change any of the syscall implementations
because (a) the LP32 ones have sizeof(int) == sizeof(long) anyway,
which is how we never noticed this bug before and (b) the LP64 ones
all use a 64-bit register for the result (and for the syscall number
too).

Bug: https://code.google.com/p/android/issues/detail?id=73952
Change-Id: I9866c3579a7a94de27bfbe80ad7a822c3183c7fb
2014-07-28 12:33:07 -07:00
Elliott Hughes
8c66fd798e Merge "Use vsnprintf(3) in syslog(3)." 2014-07-24 20:55:36 +00:00
Elliott Hughes
f1e83cc34a Use vsnprintf(3) in syslog(3).
It seemed like a clever trick to use the internal log message formatting
code in syslog(3), but on reflection that means you can't (for example)
format floating point numbers. This patch switches us over to using good
old vsnprintf(3), even though that requires us to jump through a few hoops.

There's no obvious way to unit test this, so I wrote a little program and
ran that.

(cherry-pick of b1b60c30bf321c0fc02264b953b5c16c49d34457.)

Bug: 14292866
Change-Id: I9c83500ba9cbb209b6f496067a91bf69434eeef5
2014-07-28 09:43:21 -07:00
Elliott Hughes
50a9630cc2 Merge "Start hiding "private/bionic_time.h"." 2014-07-24 20:55:36 +00:00
Elliott Hughes
905e6d58aa Start hiding "private/bionic_time.h".
Bug: 15765976
Change-Id: Ibd9cf07067ec8dffe9fda6c3d498d4ab90708220
2014-07-25 12:03:51 -07:00
Elliott Hughes
1a918d9be8 Merge "Remove localtime_tz and strftime_tz." 2014-07-24 20:55:36 +00:00
Elliott Hughes
39d903aea9 Remove localtime_tz and strftime_tz.
This also brings our copy of strftime.c much closer to upstream, though
we still have several GNU extensions and hacks to deal with Android32's
broken time_t.

Bug: 15765976
Change-Id: Ic9ef36e8acd3619504ecc4d73feec2b61fd4dfa1
2014-07-25 15:50:31 -07:00
Dan Albert
a4c14fda91 Merge "en_US.UTF-8 is also supported." 2014-07-24 20:55:36 +00:00