Commit graph

7775 commits

Author SHA1 Message Date
Elliott Hughes
15a0456d0b Remove unnecessary instructions from x86/x86_64 syscalls.
__set_errno returns -1 exactly so that callers don't need to bother.
The other architectures were already taking advantage of this, but
no one had ever fixed x86 and x86_64.

Change-Id: Ie131494be664f6c4a1bbf8c61bbbed58eac56122
2014-06-05 17:24:30 -07:00
Elliott Hughes
50b79530c6 Merge "Fix unwinding through x86-64 __bionic_clone." 2014-06-05 23:38:19 +00:00
Elliott Hughes
aeb3016f81 Fix unwinding through x86-64 __bionic_clone.
x86-64 needs these CFI directives to stop unwinding here.
I've also cleaned up the assembler a little, and made x86 and x86-64
a little more alike.

Bug: 15195760
Change-Id: I40f92c007843c29c933bb6876fe2b4611e1b946b
2014-06-05 16:36:06 -07:00
Dan Albert
9c101eb9d1 Merge "Removes index() from bionic." 2014-06-05 21:34:49 +00:00
Christopher Ferris
8ac8278b0a Merge "Fix for slm-tuned memmove (both 32- and 64-bit)." 2014-06-05 18:10:59 +00:00
Varvara Rainchik
fce861498c Fix for slm-tuned memmove (both 32- and 64-bit).
Introduce a test for memmove that catches a fault.
Fix both 32- and 64-bit versions of slm-tuned memmove.

Change-Id: Ib416def2610a0972e32c3b9b6055b54967643dc3
Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
2014-06-05 11:08:09 -07:00
Dan Albert
40fca0f08b Removes index() from bionic.
This function has been removed from POSIX.

Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place
because defining a preprocessor macro for index() breaks a whole lot of code.

Bug: 13935372
Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
2014-06-05 11:05:10 -07:00
Dan Albert
431aa4dc92 Merge "Remove bsd_signal and sysv_signal from bionic LP64." 2014-06-05 18:03:45 +00:00
Dan Albert
205dd7d9b3 Remove bsd_signal and sysv_signal from bionic LP64.
bsd_signal was removed in POSIX 2008, sysv_signal was never POSIX.

Bug: 13935372
Change-Id: I7688e5cc317247ff075dcf99b598f515fb4f15c4
2014-06-05 08:21:17 -07:00
Elliott Hughes
8aabecf35c Merge "Hide __libc_fini." 2014-06-05 03:24:25 +00:00
Dan Albert
768120416b Merge "Revert "Remove ftime from bionic LP64"" 2014-06-05 00:50:56 +00:00
Dan Albert
0921204660 Revert "Remove ftime from bionic LP64"
Breaking some build... will look in to it later.

This reverts commit 26d6799bbe.

Change-Id: I35fa770221be3a181bd37c6c3dce1bf37a69a4a1
2014-06-05 00:50:43 +00:00
Dan Albert
428581fb45 Merge "Remove ftime from bionic LP64" 2014-06-04 23:42:27 +00:00
Elliott Hughes
1f29665f15 Hide __libc_fini.
Bug: 11156955
Change-Id: Id5af3540c6ec4d9ef969d62a230144fe8bb76b0b
2014-06-04 16:29:37 -07:00
Dan Albert
26d6799bbe Remove ftime from bionic LP64
Bug: 13935372
Change-Id: I5dd31147143b23a090a3b75b846dc5354e599121
2014-06-04 16:25:24 -07:00
Elliott Hughes
37229f2a92 Merge "Temporarily expose dlmalloc_usable_size." 2014-06-04 23:11:06 +00:00
Elliott Hughes
6403cc4870 Temporarily expose dlmalloc_usable_size.
Bug: 15425694
Change-Id: I47e1ca598817359260c372fec8072e76886054f0
2014-06-04 16:08:17 -07:00
Elliott Hughes
53e3bbab07 Merge "Temporary fix for asan_malloc_linux.cc build failure." 2014-06-04 22:21:13 +00:00
Elliott Hughes
14442bb229 Temporary fix for asan_malloc_linux.cc build failure.
Bug: 15432753
Change-Id: I02a3a2c826e6d01e6809c51588a9670dcd179123
2014-06-04 15:20:46 -07:00
Elliott Hughes
38732aa9ea Merge "Fix debug malloc." 2014-06-04 21:10:55 +00:00
Elliott Hughes
8e52e8fe83 Fix debug malloc.
Previously the dynamically-loaded part of the debug malloc implementation
wanted to access hidden symbols in libc itself.

Bug: 15426546
Change-Id: I6a366ef626854d1af1d705ca24842817b1c02a19
2014-06-04 14:08:20 -07:00
Dan Albert
623dce3bd4 Merge "Removes wcswcs from bionic for LP64." 2014-06-04 20:59:10 +00:00
Dan Albert
001f8f041b Removes wcswcs from bionic for LP64.
Bug: 13935372
Change-Id: I0deb15e769da4fa81bb65a87f3c86db5163a5796
2014-06-04 12:01:56 -07:00
Elliott Hughes
e120cba31d Merge "Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11." 2014-06-04 16:17:10 +00:00
Dan Albert
452e091300 Merge "Adds functionality specified by uchar.h" 2014-06-04 16:10:50 +00:00
Elliott Hughes
be8df2e744 Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.
revision 1.11
date: 2014/06/04 07:45:25;  author: stsp;  state: Exp;  lines: +1 -7;  commitid:
 zJPRH5RUO224FmQu;
Remove assigned but unused local variables and macro from vfwprintf().
Found by Elliott @ google
ok mpi@

Change-Id: I716edc0c4d736a484a5317942de8e87bd8c6fd26
2014-06-04 09:00:25 -07:00
Dan Albert
7a7f9952c1 Adds functionality specified by uchar.h
mbrtoc32 and c32rtomb get their implementations from mbrtowc and wcrtomb. The
wc functions now simply call the c32 functions.

Bug: 14646575
Change-Id: I49d4b95fed0f9d790260c996c4d0f8bfd1686324
2014-06-04 08:39:24 -07:00
Elliott Hughes
38ed337c13 Merge "Hide dlmalloc symbols." 2014-06-04 03:30:37 +00:00
Elliott Hughes
9b5235d74e Hide dlmalloc symbols.
We need to leave dlmalloc_trim and dlmalloc_inspect_all exposed for
the VM, but if we're seriously looking at other malloc implementations,
that's something we're going to have to fix.

Bug: 11156955
Change-Id: If85156c280044f1616c09a3c50ba674aaf0e8d3a
2014-06-03 18:47:17 -07:00
Dan Albert
c380189410 Merge "Removes bcopy and bzero from bionic." 2014-06-04 01:00:40 +00:00
Dan Albert
ce9ce28e5d Removes bcopy and bzero from bionic.
These symbols are still defined for LP32 for binary compatibility, but
the declarations have been replaced with the POSIX recommended #defines.

Bug: 13935372
Change-Id: Ief7e6ca012db374588ba5839f11e8f3a13a20467
2014-06-03 17:22:07 -07:00
Elliott Hughes
3dbc2fe33e Merge "Work around "error: variable 'uio' set but not used"." 2014-06-03 23:41:35 +00:00
Elliott Hughes
b082645ccb Work around "error: variable 'uio' set but not used".
I've sent the real fix upstream, and will merge that when they commit it.

Change-Id: I75e5cab87026f8990c585d364dd178753d727e2a
2014-06-03 16:39:58 -07:00
Elliott Hughes
bd6b849754 Merge "Remove an unused parameter from the dlopen implementation." 2014-06-03 23:36:35 +00:00
Elliott Hughes
1a58629340 Remove an unused parameter from the dlopen implementation.
Change-Id: I9297913a743bb570b48ebbe594ff711a481e89e0
2014-06-03 16:23:08 -07:00
Elliott Hughes
be15d16b72 Merge "Turn on -Wunused and fix the mistakes it uncovers." 2014-06-03 23:14:21 +00:00
Elliott Hughes
d286796fce Turn on -Wunused and fix the mistakes it uncovers.
Change-Id: I023d2d8b547fbc21d4124bb7510d42b06a0dc501
2014-06-03 15:22:34 -07:00
Dan Albert
2f9400b679 Merge "Use __libc_fatal() for failed malloc in new" 2014-06-03 16:53:47 +00:00
Dan Albert
989725940e Use __libc_fatal() for failed malloc in new
This way we can print a useful message to the log isntead of just dying
mysteriously.

Change-Id: Ib660c2fd8ce8bb9aa0d0bb634ae08c645d3901e5
2014-06-02 18:48:53 -07:00
Elliott Hughes
987bd5c64f am 2deef73f: Merge "Avoid a system call in \'gettid\'."
* commit '2deef73fe1e9dbf57b683a15fd1e0c2922e6ecc0':
  Avoid a system call in 'gettid'.
2014-06-02 17:48:53 +00:00
Elliott Hughes
2deef73fe1 Merge "Avoid a system call in 'gettid'." 2014-06-02 17:43:27 +00:00
Elliott Hughes
5d9a7ba0dc Avoid a system call in 'gettid'.
System calls can be pretty slow. This is mako, which has one of our
lowest latencies:

                       iterations      ns/op
  BM_unistd_getpid       10000000        209
  BM_unistd_gettid      200000000          8

Bug: 15297299 (kernel panic from too many gettid calls)
Bug: 15315766 (excessive gettid overhead in liblogd)
Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
2014-06-02 10:32:55 -07:00
Dmitriy Ivanov
5f29c32844 am 831405b7: Merge "Make atexit.dlclose work for glibc"
* commit '831405b749d15a11fb947a40d61fd858e952d860':
  Make atexit.dlclose work for glibc
2014-05-31 01:31:26 +00:00
Dmitriy Ivanov
831405b749 Merge "Make atexit.dlclose work for glibc" 2014-05-31 01:28:33 +00:00
Dmitriy Ivanov
214e64135e Make atexit.dlclose work for glibc
* build libtest_atexit.so
 * remove atexit(NULL) - glibc segfaults on it

Bug: 15350494
Change-Id: I27d79130c32c5691b0e8790a57d92f9710f5bf4a
2014-05-30 18:16:09 -07:00
Christopher Ferris
bd1ec44cc5 am 66b5e6b6: Merge "Do not run dlclose test on glibc."
* commit '66b5e6b609f16062262b777905bdd2305a941596':
  Do not run dlclose test on glibc.
2014-05-31 00:43:52 +00:00
Christopher Ferris
66b5e6b609 Merge "Do not run dlclose test on glibc." 2014-05-31 00:41:37 +00:00
Elliott Hughes
d3f2a204b7 am 7a5732bd: Merge "Add some missing __noreturn attributes."
* commit '7a5732bd83c64489b9bd953f49fb6ad3b420126c':
  Add some missing __noreturn attributes.
2014-05-30 23:01:01 +00:00
Elliott Hughes
7a5732bd83 Merge "Add some missing __noreturn attributes." 2014-05-30 22:58:42 +00:00
Elliott Hughes
6203e7b853 Add some missing __noreturn attributes.
This is more honest, and lets us remove a hack.

Change-Id: I309f064743ded5248573ccafc379f78d417db08d
2014-05-30 15:56:25 -07:00