Commit Graph

5149 Commits

Author SHA1 Message Date
Chih-Hung Hsieh
e561e5db73 am 4f8268e3: Merge "Replace ambiguous cmp instruction with cmpl."
* commit '4f8268e38f151724722bcb489c32185a93fd86ba':
  Replace ambiguous cmp instruction with cmpl.
2014-08-27 23:00:09 +00:00
Chih-Hung Hsieh
4f8268e38f Merge "Replace ambiguous cmp instruction with cmpl." 2014-08-27 22:46:07 +00:00
Chih-Hung Hsieh
857fa6b2a3 Replace ambiguous cmp instruction with cmpl.
Clang assembler rejects ambiguous cmp instruction.

BUG: 17302482
Change-Id: I74f49de87464541f9fe6fa288e4093a9fbf37120
2014-08-27 15:04:23 -07:00
Christopher Ferris
b78e60e7b7 Use the default unwind code.
This speeds up the debug malloc code by using the original unwinding code.
The only catch is that it has to link in the libc++ arm unwind code or
there will be crashes when attempting to unwind through libc++ compiled
code.

Bug: 16874447

(cherry picked from commit 3f7635f490)

Change-Id: If8a3821cdd95ed481bb496bf2daab449d13790f8
2014-08-27 13:13:21 -07:00
Elliott Hughes
7a9471d815 am 64ae11ab: Merge "Switch to OpenBSD <err.h> implementation."
* commit '64ae11ab766421fe2c49ebdecb14c36fe0a047fe':
  Switch to OpenBSD <err.h> implementation.
2014-08-27 17:39:28 +00:00
Christopher Ferris
7bad1a90f1 am 3f7635f4: Use the default unwind code.
* commit '3f7635f4906c53fa744731efc35235456b7d93bf':
  Use the default unwind code.
2014-08-27 04:46:05 +00:00
Hans Boehm
3b32ba0e2c am 6bfcefe0: Merge "Undefine _Atomic before redefining"
* commit '6bfcefe02f8fbeec1f6790bd5ebb1fdd5dba1e33':
  Undefine _Atomic before redefining
2014-08-27 00:01:46 +00:00
Elliott Hughes
d961078f2d am 07401c71: Merge "Switch to OpenBSD daemon(3)."
* commit '07401c7136af113304a22f4a8245ef3fc1b6929b':
  Switch to OpenBSD daemon(3).
2014-08-27 00:01:45 +00:00
Elliott Hughes
cc7e5f489f Switch to OpenBSD <err.h> implementation.
Change-Id: Ia950d88871a30f68e74f9ac7dbd87788e128e02f
2014-08-26 17:00:37 -07:00
Elliott Hughes
f975bc2d59 am 7b87d441: Merge "Switch to OpenBSD res_random."
* commit '7b87d441b0f2aa3ad5021ab6bd879a995a1bc2ce':
  Switch to OpenBSD res_random.
2014-08-26 23:41:23 +00:00
Elliott Hughes
06b033942a am 59de803a: Merge "libc should use O_CLOEXEC when opening files for its own use."
* commit '59de803af98a284378303489f614be3e53800b3f':
  libc should use O_CLOEXEC when opening files for its own use.
2014-08-26 23:41:23 +00:00
Hans Boehm
6bfcefe02f Merge "Undefine _Atomic before redefining" 2014-08-26 23:34:49 +00:00
Elliott Hughes
07401c7136 Merge "Switch to OpenBSD daemon(3)." 2014-08-26 23:33:43 +00:00
Elliott Hughes
e5055179fd Switch to OpenBSD daemon(3).
Change-Id: I1fd0be09fdb24aa6f1d945410eba5987f8a949b4
2014-08-26 16:25:19 -07:00
Elliott Hughes
f73183f1a3 More cases where libc should use O_CLOEXEC.
Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
2014-08-26 16:20:59 -07:00
Elliott Hughes
7b87d441b0 Merge "Switch to OpenBSD res_random." 2014-08-26 23:18:04 +00:00
Christopher Ferris
3f7635f490 Use the default unwind code.
This speeds up the debug malloc code by using the original unwinding code.
The only catch is that it has to link in the libc++ arm unwind code or
there will be crashes when attempting to unwind through libc++ compiled
code.

Bug: 16874447
Change-Id: Ifdbbcbd4137d668b25cf3c2bd59535e06ebfa5a7
2014-08-26 16:02:51 -07:00
Hans Boehm
3e4a0099a1 Undefine _Atomic before redefining
Stdatomic.h was potentially redefining _Atomic, in spite of a
prior definition by <atomic>.  This could cause g++ builds that
included <stdatomic.h> with an available <atomic> header to break.

Change-Id: I562c7115118c0587d594d4d5b62d25101e47bfd8
2014-08-26 15:58:15 -07:00
Elliott Hughes
c674edbf27 libc should use O_CLOEXEC when opening files for its own use.
Change-Id: I159f1d57e0ca090d837f57854fcef5879b8b8248
2014-08-26 15:56:54 -07:00
Elliott Hughes
05409dedcd am c764fb24: Merge "Fix pthread_getattr_np for the main thread."
* commit 'c764fb24ccb47e05d8e140cde5b4111225790ef1':
  Fix pthread_getattr_np for the main thread.
2014-08-26 20:08:44 +00: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
a9c435e072 am 9e307af9: Merge "Add standard throw() spec to delete operators."
* commit '9e307af982ea9030849293b5e3307733289e3c2c':
  Add standard throw() spec to delete operators.
2014-08-25 22:29:24 +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
685c722d32 am a4a8c4fe: Merge "Fix, generalize stdatomic.h; improve test."
* commit 'a4a8c4feb8cf3cebf8aceace70e699e128095b5c':
  Fix, generalize stdatomic.h; improve test.
2014-08-22 23:15:54 +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
Dan Albert
740cf634f7 am 0b9fa4c9: Merge "Fix dlmalloc build."
* commit '0b9fa4c9bff5d3128f120a2008aa6997c7363b49':
  Fix dlmalloc build.
2014-08-22 18:25:06 +00:00
Dan Albert
ef619cc083 Fix dlmalloc build.
Change-Id: Ied542c40867ab443cdd2076bd2e535b00c4854e4
2014-08-22 11:05:48 -07:00
Dan Albert
a2dcd9449e am 4756afe3: Merge "Implement malloc_info(3)."
* commit '4756afe3d5017b50c89761c47f0da17a6799c81e':
  Implement malloc_info(3).
2014-08-22 18:04:08 +00: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
Dan Albert
ab537ae574 am 2e6c5fc4: Merge "Remove _flush_cache(2) for mips64."
* commit '2e6c5fc4e903b6ef58bd94e13e51b3f0aa4689b3':
  Remove _flush_cache(2) for mips64.
2014-08-21 22:12:30 +00:00
Dan Albert
2e6c5fc4e9 Merge "Remove _flush_cache(2) for mips64." 2014-08-21 21:51:42 +00:00
Dmitriy Ivanov
87c5f24e4e am 2bd88d45: Merge "Run constructors before resolving ifunc functions"
* commit '2bd88d450ead2ad8b44a76126c720cf4a9772002':
  Run constructors before resolving ifunc functions
2014-08-21 21:45:24 +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
ba8dede858 am 31572118: Merge "__gnu_basename(3) is accounted for."
* commit '3157211849f808f89a7f1465fd60d6b41917ee4f':
  __gnu_basename(3) is accounted for.
2014-08-21 19:33:19 +00:00
Dan Albert
2320b02c7d __gnu_basename(3) is accounted for.
Change-Id: I3836b14a797c4a8d121c6d29d95791ac768257da
2014-08-21 11:36:07 -07:00
Elliott Hughes
d00ce65a16 am 2d80400a: Fix some 32-bit-isms in <stdio.h>.
* commit '2d80400a9e8454038a3ec29959436184be0c4c65':
  Fix some 32-bit-isms in <stdio.h>.
2014-08-21 18:25:59 +00:00
Elliott Hughes
1fa71e6cbb am d5fbc371: Merge "Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream."
* commit 'd5fbc37119ef6cd757ceb449cb071ee03c66590e':
  Add POSIX-2008 fmemopen, open_memstream, and open_wmemstream.
2014-08-21 03:11:32 +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
ff3adf1632 am b6ed5407: Merge "Simplify _ALIGN_TEXT."
* commit 'b6ed54076abdd337150d7a92a661247b69d26cb4':
  Simplify _ALIGN_TEXT.
2014-08-20 20:54:13 +00:00
Elliott Hughes
1b6b56a9a6 am 7134fc30: Merge "Regenerate "services.h" from /etc/services."
* commit '7134fc30892bff763e7c24ac722151e0777b5409':
  Regenerate "services.h" from /etc/services.
2014-08-20 20:49:21 +00:00
Elliott Hughes
28bd4fd080 am 3bcd414b: Merge "Clean up some of our python scripts."
* commit '3bcd414b78e515482139c7dc3dad8cad3357b374':
  Clean up some of our python scripts.
2014-08-20 20:49:21 +00:00
Elliott Hughes
c64b680066 am 55244a9b: Merge "Add <stdio_ext.h> for elfutils."
* commit '55244a9bdbc661212999655644c374352ae92040':
  Add <stdio_ext.h> for elfutils.
2014-08-20 20:49:14 +00:00
Hans Boehm
c4b55c1221 am b61c5064: Merge "Work around atomic_load(const T*) issues."
* commit 'b61c50647b85b3c33af8ca155e88ec098d9e8cb0':
  Work around atomic_load(const T*) issues.
2014-08-20 20:48:45 +00:00
Elliott Hughes
0e7f8a9e52 Simplify _ALIGN_TEXT.
Bug: 16872067
Change-Id: I2b622f252c21ce1b344c040f828ab3f4bf9b6c0a
2014-08-20 13:11:58 -07:00
Elliott Hughes
2d80400a9e Fix some 32-bit-isms in <stdio.h>.
Bug: 17157793
Change-Id: I8290e240b92e5617f4c12c0eacad6e622e677b6a
2014-08-20 12:14:21 -07:00
Hans Boehm
b61c50647b Merge "Work around atomic_load(const T*) issues." 2014-08-19 22:32:42 +00:00