Commit graph

8291 commits

Author SHA1 Message Date
Dmitriy Ivanov
608217e167 Remove unnecessary calls to LinkedList::clear()
Change-Id: I981d2700cb17322c634b751715543fd33ee49b7c
2014-08-26 15:56:31 -07:00
Dmitriy Ivanov
d2bd3c4717 Merge "Enable __cxa_atexit && __cxa_finalize for linker" 2014-08-26 22:53:16 +00:00
Dmitriy Ivanov
14241402de Enable __cxa_atexit && __cxa_finalize for linker
This allows adding destructors to classes used
 for global variables.

Change-Id: I5e1cd63fe3bf8f66de88cc4f7437cafb350f49b5
2014-08-26 15:44:18 -07:00
Elliott Hughes
c764fb24cc Merge "Fix pthread_getattr_np for the main thread." 2014-08-26 19:53:40 +00:00
Elliott Hughes
57b7a6110e Fix pthread_getattr_np for the main thread.
On most architectures the kernel subtracts a random offset to the stack
pointer in create_elf_tables by calling arch_align_stack before writing
the auxval table and so on. On all but x86 this doesn't cause a problem
because the random offset is less than a page, but on x86 it's up to two
pages. This means that our old technique of rounding the stack pointer
doesn't work. (Our old implementation of that technique was wrong too.)

It's also incorrect to assume that the main thread's stack base and size
are constant. Likewise to assume that the main thread has a guard page.
The main thread is not like other threads.

This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK)
whenever we're asked.

Bug: 17111575
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Change-Id: I1d4dbffe7bc7bda1d353c3a295dbf68d29f63158
2014-08-26 10:36:38 -07:00
Chih-Hung Hsieh
9e307af982 Merge "Add standard throw() spec to delete operators." 2014-08-25 22:08:33 +00:00
Chih-Hung Hsieh
ae558d6b4b Add standard throw() spec to delete operators.
Without these specs, clang will reports mismatch between standard definitions and these declarations/definitions. These specs are ignored when compiled with -fno-exceptions.

BUG: 17136236
Change-Id: I386c712a61dc4fc74dfde45f9ec2d3d037f2e9f1
2014-08-25 21:16:14 +00:00
Hans Boehm
a4a8c4feb8 Merge "Fix, generalize stdatomic.h; improve test." 2014-08-22 22:52:31 +00:00
Hans Boehm
00aaea3645 Fix, generalize stdatomic.h; improve test.
We seem to use this stdatomic.h sometimes, and slightly different prebuilts
at other times, making them all difficult to test, and making it unclear
which one we're testing.  This generalizes the bionic header so that it
can be used directly as the prebuilt header as well.  So long as they
don't diverge again, that should somewhat improve test coverage.

Use the correct builtin for atomic_is_lock_free.

Fix atomic_flag_init.

Turn on atomic tests even with __GLIBC__, since they now appear to pass.

Include uchar.h in stdatomic.h where needed.

Add a basic memory ordering test.

Fix bit-rotted comments in bionic tests makefile.

Change-Id: If6a14c1075b379395ba5d93357d56025c0ffab68
2014-08-22 15:50:17 -07:00
Dmitriy Ivanov
9d34f6a909 Merge "Bump soinfo version" 2014-08-22 20:44:56 +00:00
Dmitriy Ivanov
0d15094287 Bump soinfo version
This includes:
 1. Placing has_ifunc after fields with version = 0
 2. Switch to has_min_version(v) function.
 3. Minor soinfo initialization refactoring (placement new + ctor)

Change-Id: I1bf5fde4d930914012ce5f3ad5acb48217da9b2d
2014-08-22 13:29:18 -07:00
Dan Albert
0b9fa4c9bf Merge "Fix dlmalloc build." 2014-08-22 18:06:36 +00:00
Dan Albert
ef619cc083 Fix dlmalloc build.
Change-Id: Ied542c40867ab443cdd2076bd2e535b00c4854e4
2014-08-22 11:05:48 -07:00
Dan Albert
4756afe3d5 Merge "Implement malloc_info(3)." 2014-08-22 17:39:18 +00:00
Dan Albert
4caa1f0977 Implement malloc_info(3).
Expose jemalloc stats through the malloc_info(3) interface.

Bug: 16874689
Change-Id: I4358ac283002e60ff161107028d1a3fb1e9afb0a
2014-08-22 10:23:12 -07:00
Elliott Hughes
538db6d2e6 Merge "Fix unistd.getpid_caching_and_clone." 2014-08-22 16:28:02 +00:00
Elliott Hughes
2b3b2ecee8 Fix unistd.getpid_caching_and_clone.
This test only works if you're root (strictly: if you have permission to
CLONE_NEWNS), so it's useful to us when we're doing ad hoc testing (since
that's usually done as root), but it's not useful as part of CTS or when
running the tests on the host.

(cherry-pick of 84d0683a824fa02dbaa6d1b56a79223804b54e80.)

Bug: 16705621
Bug: 17170200
Change-Id: Ia92c871b15f7e45fc174bb59bc95540fd00ae745
2014-08-22 09:26:50 -07:00
Dan Albert
2e6c5fc4e9 Merge "Remove _flush_cache(2) for mips64." 2014-08-21 21:51:42 +00:00
Dmitriy Ivanov
2bd88d450e Merge "Run constructors before resolving ifunc functions" 2014-08-21 21:27:52 +00:00
Dmitriy Ivanov
9598b8c415 Run constructors before resolving ifunc functions
Bug: 17177284
Change-Id: I5714b9bc2d1ca8f8711806bfb68da3d524213e99
2014-08-21 14:24:13 -07:00
Dan Albert
47793d6a29 Remove _flush_cache(2) for mips64.
Also remove declaration.

The only user is compiler-rt, and they can replace that call with one to
syscall(2). compiler-rt doesn't currently build on mips64 anyway.

Bug: 11156955
Change-Id: Ieae0ba49c8e7aa50253401fc1d7c2d17bc867d39
2014-08-21 13:32:37 -07:00
Dan Albert
3157211849 Merge "__gnu_basename(3) is accounted for." 2014-08-21 19:14:44 +00:00
Dan Albert
2320b02c7d __gnu_basename(3) is accounted for.
Change-Id: I3836b14a797c4a8d121c6d29d95791ac768257da
2014-08-21 11:36:07 -07:00
Elliott Hughes
d5fbc37119 Merge "Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream." 2014-08-21 00:17:56 +00:00
Elliott Hughes
6b841db2ba Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream.
Bug: 17164505
Change-Id: I59e28a08ff8b6ab632230b11a5807cfd5278aeb5
2014-08-20 17:03:46 -07:00
Elliott Hughes
b6ed54076a Merge "Simplify _ALIGN_TEXT." 2014-08-20 20:25:32 +00:00
Elliott Hughes
0e7f8a9e52 Simplify _ALIGN_TEXT.
Bug: 16872067
Change-Id: I2b622f252c21ce1b344c040f828ab3f4bf9b6c0a
2014-08-20 13:11:58 -07:00
Elliott Hughes
7134fc3089 Merge "Regenerate "services.h" from /etc/services." 2014-08-16 04:28:29 +00:00
Elliott Hughes
c4a1de1ae2 Regenerate "services.h" from /etc/services.
Change-Id: Iec118f9a342b5c1f6ce6d48965798b12a7159ad3
2014-08-20 12:11:31 -07:00
Elliott Hughes
3bcd414b78 Merge "Clean up some of our python scripts." 2014-08-16 04:28:29 +00:00
Elliott Hughes
dc1fb7000a Clean up some of our python scripts.
Change-Id: Ifa75345db43434298cfb6113fbe2f7a33b88c79d
2014-08-20 11:16:11 -07:00
Elliott Hughes
55244a9bdb Merge "Add <stdio_ext.h> for elfutils." 2014-08-19 02:44:29 +00:00
Elliott Hughes
2b021e1066 Add <stdio_ext.h> for elfutils.
Bug: 17139679
Change-Id: I1605ac382dbb6f23b2d874dbb9769f3cde4a6a99
2014-08-20 10:23:52 -07:00
Hans Boehm
b61c50647b Merge "Work around atomic_load(const T*) issues." 2014-08-19 22:32:42 +00:00
Hans Boehm
1e8587a479 Work around atomic_load(const T*) issues.
Bug:17067219
Change-Id: I78e753bcf03464f5f05c3f37e394f2727d282589
2014-08-19 14:50:54 -07:00
Elliott Hughes
c5d6df6f2f Merge "Add in_port_t and move it and in_addr_t to the correct header file." 2014-08-19 15:49:56 +00:00
Elliott Hughes
35d226e05d Add in_port_t and move it and in_addr_t to the correct header file.
No one's reported this, but I saw it in an Android port of fuser(1).

We still have lots of problems in our network headers because we
get most of the structs direct from the kernel, and it doesn't use
types like this (which is why we've got away without this one for
so long). One day we should probably look at cleaning that up, but
doing so can wait.

Change-Id: If15edf0cfc32716fa312d7ed97c48321b760d979
2014-08-19 12:43:50 -07:00
Elliott Hughes
b9d674c8ad Merge "Implement the GNU basename(3) in addition to the POSIX one." 2014-08-19 02:44:29 +00:00
Elliott Hughes
09c39d6df0 Implement the GNU basename(3) in addition to the POSIX one.
Code like perf(1) needs this.

Bug: 11860789
Change-Id: I907eb448052a7b165e4012d74303330d32328cb2
2014-08-19 14:30:30 -07:00
Elliott Hughes
6f4220c49e Merge "Move the meat of <features.h> into <sys/cdefs.h>." 2014-08-19 02:44:29 +00:00
Elliott Hughes
f4c948a9e9 Move the meat of <features.h> into <sys/cdefs.h>.
This way it's a lot harder for us to screw up (since we should always
be including <sys/cdefs.h> anyway).

Bug: 14659579
Change-Id: I23070fff3296b0d1c683bb5e3a6e214146327d53
2014-08-19 11:18:20 -07:00
Elliott Hughes
17f83c93cb Merge "Remove unused defines from <features.h>." 2014-08-19 02:44:29 +00:00
Elliott Hughes
f800969d35 Remove unused defines from <features.h>.
Bug: 14659579
Change-Id: I2ab02b13cafe3faad31248b843d39ab2cdbfeb91
2014-08-19 10:07:00 -07:00
Elliott Hughes
e4fcc3ad2b Merge "Fix _BSD_SOURCE/__USE_BSD." 2014-08-19 02:44:29 +00:00
Elliott Hughes
b810462028 Fix _BSD_SOURCE/__USE_BSD.
Bug: 14659579
Change-Id: I80ec9584f054c02d1078828f6bca759c42bc1d4c
2014-08-19 09:18:03 -07:00
Dmitriy Ivanov
8a76ee821e Merge "Revert "Add support for protected local symbol lookup."" 2014-08-19 02:44:29 +00:00
Dmitriy Ivanov
02aa70589d Revert "Add support for protected local symbol lookup."
This reverts commit d97e9f546e.

Bug: 17107521
(cherry picked from commit 9419420919)

Change-Id: I1a6df946ac8075699e77d68ffa6ac4a21b88e4bf
2014-08-19 05:19:53 -07:00
Dan Albert
2222eae61e Merge "Missing #include <sys/cdefs.h>." 2014-08-16 04:28:29 +00:00
Dan Albert
3a25ab952b Missing #include <sys/cdefs.h>.
Needed for __BEGIN_DECLS/__END_DECLS. Currently fine because it's being
included after other files that do this.

Change-Id: I1f12368fc461f6ef5ca90992cf19f317f0b5d7af
2014-08-19 11:08:02 -07:00
Dan Albert
934c8015d5 Merge "Expose android_set_abort_message()." 2014-08-16 04:20:19 +00:00