Commit Graph

15001 Commits

Author SHA1 Message Date
Dmitriy Ivanov
7271caf93d Lock on dl_interate_phdr
There is possibility of someone dlclosing a library
while dl_iterate_phdr in progress which can lead to
dl_iterate_phdr calling callback with invalid address
if it was unmapped by dlclose.

Bug: http://b/22047255
Change-Id: I3fc0d9fd2c51fb36fd34cb035f37271fa893a7be
(cherry picked from commit f7d5bf334d)
2015-06-29 15:14:28 -07:00
Dmitriy Ivanov
f7d5bf334d Lock on dl_interate_phdr
There is possibility of someone dlclosing a library
while dl_iterate_phdr in progress which can lead to
dl_iterate_phdr calling callback with invalid address
if it was unmapped by dlclose.

Bug: http://b/22047255
Change-Id: I3fc0d9fd2c51fb36fd34cb035f37271fa893a7be
2015-06-29 14:48:25 -07:00
Dmitriy Ivanov
168ebad960 am 46d24d12: Merge "Replace NULL with nullptr"
* commit '46d24d12e167a0b5afa4ded218aa4db0a477141a':
  Replace NULL with nullptr
2015-06-29 21:34:07 +00:00
Elliott Hughes
6bae84af9b am 25da2d7c: Merge "Add <sysexits.h>."
* commit '25da2d7ca2795156552ed96e1f3c3245330682b0':
  Add <sysexits.h>.
2015-06-29 21:23:22 +00:00
Dmitriy Ivanov
46d24d12e1 Merge "Replace NULL with nullptr" 2015-06-29 21:08:49 +00:00
Elliott Hughes
25da2d7ca2 Merge "Add <sysexits.h>." 2015-06-29 21:01:05 +00:00
Elliott Hughes
59d5854d14 Add <sysexits.h>.
Taken from current upstream OpenBSD.

Bug: http://b/22172963
Change-Id: Ic899e08541335777296fa8ec99e518f35a100144
2015-06-29 13:44:34 -07:00
Yusuke Sato
f7d88aefb8 am 71107cdd: Merge "Rename ZipEntryName to ZipString"
* commit '71107cdd028461c433a39a10eb192edbdf03dede':
  Rename ZipEntryName to ZipString
2015-06-29 18:14:58 +00:00
Yusuke Sato
71107cdd02 Merge "Rename ZipEntryName to ZipString" 2015-06-29 17:49:41 +00:00
egor.kochetov
a05bee544a Fixed uchar.h for clang3.6
The NDK self-test issue64679-prctl failed to build because by default
clang3.6 builds in C11 mode, but the ifdef in the file 'uchar.h' hid the
required char16_t and char32_t declarations based on the GCC version,
which is declared as 4 by clang.

The ifdef is changed so that it is based on C version rather than a
compiler version. This way it is compatible with gcc 4, gcc 5 and clang
which are actually the only used toolchains.

See also: b.android.com/177609

Change-Id: I78c4bdc681c6f8a31b92dbe8ffe35e84ef2eda36
Signed-off-by: Egor Kochetov <egor.kochetov@intel.com>
2015-06-29 13:27:28 +03:00
Erik Kline
01e37c9665 Pass around struct android_net_context for better behaviour
Group network context elements in to a single struct and
add a version of android_getaddrinfofornet() that accepts it.

The introduction of UID-based routing means that the UID is an
integral part of the network context when evaluating connectivity,
sorting addresses, etc.

Also, introduce a distinction between DNS netids/marks and those
expected to be used by the application.  This can be important
when the network an application is using is not the same as the
network on which DNS queries will be issued.

Additionally, de-duplicate the UDP connect logic (collapse both
_test_connect() and _find_src_addr() into just the latter).

Bug: 19470192
Bug: 20733156
Bug: 21832279
Change-Id: If16c2f4744695f507993afdac078ca105eb5d3e4
2015-06-29 18:39:54 +09:00
Dmitriy Ivanov
4b42cb93c9 am 06700b2b: Fix crash when trying to load invalid ELF file.
* commit '06700b2b5e92a365505b15d0d05e2d5b0706c511':
  Fix crash when trying to load invalid ELF file.
2015-06-26 15:09:23 +00:00
Dmitriy Ivanov
61ad0cf24c am eeb9f5e4: Merge "Fix crash when trying to load invalid ELF file."
* commit 'eeb9f5e41662828989f3913d81ec23229a668434':
  Fix crash when trying to load invalid ELF file.
2015-06-26 04:12:23 +00:00
Dmitriy Ivanov
eeb9f5e416 Merge "Fix crash when trying to load invalid ELF file." 2015-06-26 03:51:27 +00:00
Dmitriy Ivanov
3f987f5b3e Fix crash when trying to load invalid ELF file.
Bug: http://b/22047255
Bug: http://b/22091640
Change-Id: I6c51cff43287a6ac4b25fa9ce6a6fc3d232fd047
(cherry picked from commit 06700b2b5e)
2015-06-25 20:05:50 -07:00
Dmitriy Ivanov
06700b2b5e Fix crash when trying to load invalid ELF file.
Bug: http://b/22047255
Bug: http://b/22091640
Change-Id: I6c51cff43287a6ac4b25fa9ce6a6fc3d232fd047
2015-06-25 17:03:26 -07:00
Yusuke Sato
56f40fbb82 Rename ZipEntryName to ZipString
This is for https://android-review.googlesource.com/#/c/156771/.

Bug: 21957428
Change-Id: Ida30c28c0fff0b2dadddbdb1aa1999ae3250610b
2015-06-25 14:56:07 -07:00
Elliott Hughes
6845f45ef9 am d19c2715: Merge "Fix x86 gdbserver build."
* commit 'd19c271599a4b8881213c7bfbb81f87d8e56a101':
  Fix x86 gdbserver build.
2015-06-25 14:44:51 +00:00
Elliott Hughes
d19c271599 Merge "Fix x86 gdbserver build." 2015-06-25 14:30:22 +00:00
Dimitry Ivanov
a56ecc3405 am 6589febe: Merge "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
* commit '6589febec212bb1d72b7e3d593a1b7fe77692f7f':
  [MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
2015-06-25 01:24:07 +00:00
Dimitry Ivanov
6589febec2 Merge "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers" 2015-06-25 01:02:20 +00:00
Elliott Hughes
fef58353f4 Fix x86 gdbserver build.
Add the x86-only elf_fpxregset_t to <sys/procfs.h>, and rename
user_fxsr_struct (the kernel's name) to user_fpxregs_struct (the
userspace name).

Bug: http://b/22068064
Change-Id: Id466096bf02baf6bd49b193f49d9036848d33548
2015-06-24 17:31:24 -07:00
Duane Sand
bc425c73e0 [MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
Enables running of older MIPS NDK-built apps on mips64r6.

Works with kernel supporting FRE emulation, and old kernels.

Change-Id: If5e392ed89e9910cd1ccd30e0fd5c4a5acea2c7d
2015-06-24 16:43:19 -07:00
Dimitry Ivanov
ee01bb6374 am c666838a: Merge "Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers""
* commit 'c666838ad6e578f429783a82f9b9a5bbddd3a9a8':
  Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
2015-06-24 21:47:39 +00:00
Dimitry Ivanov
beb609bba8 am fb3357e2: Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
* commit 'fb3357e2eb9366d87a8da96e1a0744c9b1f22af9':
  Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
2015-06-24 21:09:43 +00:00
Dimitry Ivanov
c666838ad6 Merge "Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"" 2015-06-24 20:44:36 +00:00
Dimitry Ivanov
cc83890464 Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
This reverts commit d02ec08427.

Bug: http://b/22045439
Change-Id: Iaf10ff1e2948083cce0098f29d5b87b32bfae1b7
2015-06-24 20:43:33 +00:00
Dimitry Ivanov
fb3357e2eb Revert "[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers"
This reverts commit 40d9e7bf84.

Bug: http://b/22045439
Change-Id: Ia9c56f65d35e404332a462f46460335cef39f0a4
2015-06-24 20:42:33 +00:00
Chih-Hung Hsieh
4ab0edac1a am d807b9a1: Merge "Use gcc to build and test x86_64 long double code."
* commit 'd807b9a12d3e49132b095df3d883618452033b51':
  Use gcc to build and test x86_64 long double code.
2015-06-24 00:40:16 +00:00
Chih-Hung Hsieh
d807b9a12d Merge "Use gcc to build and test x86_64 long double code." 2015-06-24 00:15:51 +00:00
Chih-Hung Hsieh
e79d06b0e8 Use gcc to build and test x86_64 long double code.
Clang/llvm x86_64 configuration of long double is still
incompatible with gcc.
https://llvm.org/bugs/show_bug.cgi?id=23897

BUG: 21899249
Change-Id: I47fd6d0ce2daa84ae0035e7885a4d90e4c3056f7
2015-06-23 23:13:39 +00:00
Dmitriy Ivanov
0a9df9a13e am af6ee5b5: Merge "Work around compiler optimization"
* commit 'af6ee5b5bc446ef5a6f2bf41bc4f2e13657978be':
  Work around compiler optimization
2015-06-23 22:17:08 +00:00
Dmitriy Ivanov
af6ee5b5bc Merge "Work around compiler optimization" 2015-06-23 21:51:35 +00:00
Dmitriy Ivanov
aff18fd608 Replace NULL with nullptr
Change-Id: If66d0c5ae1ea1ed371b44e067d4ae59ac54a8842
2015-06-23 13:58:22 -07:00
Dmitriy Ivanov
7d09a8cd11 Work around compiler optimization
This makes bionic-unit-test-glibc64 behave consistently
when testing dlopen from a library with dt_runpath.

Bug: http://b/21899363
Change-Id: I9d446eb6852876975874d6b7761f6f81cc4e9916
2015-06-23 13:47:23 -07:00
Duane Sand
bbac1d19d7 am 40d9e7bf: [MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
* commit '40d9e7bf842423e328cda58e21ff5fc0cbab5c8a':
  [MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
2015-06-23 20:45:57 +00:00
Elliott Hughes
9209b0a169 am 2b028f5c: Fix bad merge of 64e9e71cdb.
* commit '2b028f5ce47b8d27ca6d3b86e135f7d9b0359547':
  Fix bad merge of 64e9e71cdb.
2015-06-23 18:08:10 +00:00
Duane Sand
40d9e7bf84 [MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
Enables running of older MIPS NDK-built apps on mips64r6.

Works with kernel supporting FRE emulation, and old kernels.

Bug: http://b/21555893
Change-Id: I13923fe62cd83ad1d337f13a50f2eda2dfdd906f
(cherry picked from commit d02ec08427)
2015-06-23 10:33:37 -07:00
Elliott Hughes
2b028f5ce4 Fix bad merge of 64e9e71cdb.
Bug: http://b/22029751
Change-Id: I6245fe5f274c9af8a632da5eebe50cf9fe29dc4a
2015-06-23 09:14:16 -07:00
Dmitriy Ivanov
3226cad538 am d6d6c0c4: Merge "Remove libdl* tests from bionic-unit-tests-static" into mnc-dev
* commit 'd6d6c0c4f10c047b25b45289f5c30338cd1da239':
  Remove libdl* tests from bionic-unit-tests-static
2015-06-22 19:51:19 +00:00
Dmitriy Ivanov
02102d95f8 am 5fa858c5: Merge "Remove text-relocs support for apps targeting M+" into mnc-dev
* commit '5fa858c5655ed721696719ce07d81a983d4b0f5e':
  Remove text-relocs support for apps targeting M+
2015-06-22 19:51:18 +00:00
Dmitriy Ivanov
6f2bce5b8a am a8993c99: Merge "Remove text-relocs support for apps targeting M+"
* commit 'a8993c994e45ec2dc00dcef15910560e22d67be9':
  Remove text-relocs support for apps targeting M+
2015-06-22 19:50:50 +00:00
Dmitriy Ivanov
c29626c12a am 13cee57d: Merge "Remove libdl* tests from bionic-unit-tests-static"
* commit '13cee57dee4ebd14b57e7b5acd372228eb9c4a37':
  Remove libdl* tests from bionic-unit-tests-static
2015-06-22 19:50:49 +00:00
Dmitriy Ivanov
a8993c994e Merge "Remove text-relocs support for apps targeting M+" 2015-06-22 19:27:34 +00:00
Dmitriy Ivanov
e4ad91f86a Remove text-relocs support for apps targeting M+
Remove support of text-relocations for apps targeting sdk version > 22

Bug: http://b/20013628
Change-Id: I2127739544480c747315e32df15dfbd1b79de4f5
(cherry picked from commit 3e6f780754)
2015-06-22 12:26:53 -07:00
Dmitriy Ivanov
d6d6c0c4f1 Merge "Remove libdl* tests from bionic-unit-tests-static" into mnc-dev 2015-06-22 19:25:37 +00:00
Dmitriy Ivanov
5fa858c565 Merge "Remove text-relocs support for apps targeting M+" into mnc-dev 2015-06-22 19:25:15 +00:00
Dmitriy Ivanov
96ebdcdca0 Remove libdl* tests from bionic-unit-tests-static
Bug: http://b/21900592
Change-Id: I907cc15684b121ec2fbdeca49fc584bb6d2eaacc
(cherry picked from commit de4e27e231)
2015-06-22 12:24:36 -07:00
Dmitriy Ivanov
13cee57dee Merge "Remove libdl* tests from bionic-unit-tests-static" 2015-06-22 19:24:15 +00:00
Dmitriy Ivanov
de4e27e231 Remove libdl* tests from bionic-unit-tests-static
Bug: http://b/21900592
Change-Id: I907cc15684b121ec2fbdeca49fc584bb6d2eaacc
2015-06-22 11:54:58 -07:00