Commit graph

8468 commits

Author SHA1 Message Date
Elliott Hughes
05f0bfd6c5 Merge "Don't mask out SA_RESTORER from sa_flags." 2014-09-04 21:03:34 +00:00
Elliott Hughes
afe58ad989 Don't mask out SA_RESTORER from sa_flags.
glibc doesn't do this, and we probably shouldn't either.

Bug: 16703540
Change-Id: Id5b93c3782e34024a9916463348e8f3caff191bf
2014-09-04 13:54:42 -07:00
Chih-Hung Hsieh
4ee7c325df Merge "Disable Clang, due to x86 LDBL_MANT_DIG errors." 2014-09-04 20:44:34 +00:00
Chih-Hung Hsieh
356a6249d8 Disable Clang, due to x86 LDBL_MANT_DIG errors.
Clang -m32 has incorrect sizeof(long double) = 12.
With -m64, LDBL_MANT_DIG is incorrect 64.

BUG: 17163651
Change-Id: I4b157aa1a8572c3a10aece6070e119a292ab8e83
2014-09-04 12:35:19 -07:00
Elliott Hughes
071bed8091 Merge "_GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE." 2014-09-04 17:02:10 +00:00
Elliott Hughes
fc8974b7aa _GNU_SOURCE implies _BSD_SOURCE and the latest _POSIX_C_SOURCE.
This showed up as open_memstream not being visible in <stdio.h>
if only _GNU_SOURCE was defined.

Bug: 17361504
Change-Id: I38f9843f4e6ee770a6325ad50f779bda5495ffca
2014-09-04 08:53:16 -07:00
Dmitriy Ivanov
1737b15937 Merge "Load libraries in breadth-first order" 2014-09-04 00:59:23 +00:00
Dmitriy Ivanov
8f3b8f523e Merge "Fix arm64 build" 2014-09-03 23:36:35 +00:00
Elliott Hughes
58bb54c38b Merge "Add back a dummy arc4random_stir for compatibility." 2014-09-03 23:34:05 +00:00
Dmitriy Ivanov
5c1a7fdbd5 Fix arm64 build
Bug: 14611536
Change-Id: I4f7f4d1f5c0a37ef38fa0956778393f8d7668512
2014-09-03 16:33:08 -07:00
Elliott Hughes
5dea47221a Add back a dummy arc4random_stir for compatibility.
The current arc4random implementation stirs itself as needed, but we
need to keep an arc4random_stir symbol around for binary compatibility.

(cherry-pick of 1e010d60397db706cd3d1c4d5701a2bced441aa8.)

Bug: 17291075
Change-Id: Iaf6171c3ec65c39c1868364d5b35ea280e29a363
2014-09-03 16:30:22 -07:00
Dmitriy Ivanov
450aaa018d Merge "Register __libc_fini as early as possible." 2014-09-03 22:29:59 +00:00
Dmitriy Ivanov
e880c736d6 Register __libc_fini as early as possible.
We want __libc_fini to be called after all the destructors.

Bug: 14611536
Change-Id: Ibb83a94436795ec178fd605fa531ac29608f4a3e
2014-09-03 15:27:29 -07:00
Dmitriy Ivanov
8da304b997 Merge "Make string tests check all alignment combinations" 2014-09-03 22:08:57 +00:00
Dmitriy Ivanov
a3ad450a2e Load libraries in breadth-first order
This patch fixes the problem with symbol search order
  for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
  and ld_preloads in correct order.

Bug: https://code.google.com/p/android/issues/detail?id=74255
Change-Id: I4cf84c70dbaabe99310230dfda12385ae5401859
2014-09-03 15:06:14 -07:00
Dan Albert
28f1770101 Merge "Don't fail a test just because we aren't root." 2014-09-03 18:37:11 +00:00
Dan Albert
69fb9f3f40 Don't fail a test just because we aren't root.
If the tests are not being run as root, emit a message and don't
continue with the test.

Change-Id: I352e1a4162caaeb18b81b8daf44797009756dcd9
2014-09-03 11:30:21 -07:00
Dmitriy Ivanov
3b10ba6f1b Merge "Add some missing dlclose(.)" 2014-09-03 00:36:22 +00:00
Dmitriy Ivanov
319356e39c Add some missing dlclose(.)
Bug: 17358010
Change-Id: I9e427b7681f1a8fe890b0b47812d9e65ab95c792
2014-09-02 17:31:44 -07:00
Dan Albert
c7de919129 Merge "Start math tests with a clean fenv." 2014-09-02 23:11:42 +00:00
Dan Albert
6676a7d4ee Start math tests with a clean fenv.
We always want the default floating point environment when running these
tests.

Bug: 17358010
Change-Id: I6ca2552e9f2d3e07d7b9dcaf0aec66905401c466
2014-09-02 16:00:10 -07:00
Dan Albert
847e52b9b7 Merge "Prevent a few test pthread keys from leaking." 2014-09-02 22:43:18 +00:00
Dan Albert
1d53ae2a01 Prevent a few test pthread keys from leaking.
Bug: 17358010
Change-Id: Ie718dc215ddfd431650295a1630c1b1716760c3d
2014-09-02 15:24:26 -07:00
Elliott Hughes
ec95a9cf11 Merge "MIPS64 syscall() arguments" 2014-09-02 20:53:31 +00:00
Chris Dearman
296895f1a9 MIPS64 syscall() arguments
The seventh argument for syscall is passed in a register, not on the stack

Change-Id: Idb69fac77d1f710cff5a3ab4ae1259feb61ae69d
2014-09-02 12:41:01 -07:00
Dmitriy Ivanov
86f594b19b Merge "Encapsulate soinfo_link_image and soinfo_relocate" 2014-09-02 19:25:09 +00:00
Dmitriy Ivanov
29bbc9dd4c Encapsulate soinfo_link_image and soinfo_relocate
Also get rid of needed[] array for these functions

Change-Id: I8d12887dbec0724309bb171e6bbd9b9ceb32cc70
2014-09-02 11:47:23 -07:00
Elliott Hughes
4625dd751e Merge "Upgrade bionic to tzdata2014g." 2014-09-02 17:57:10 +00:00
Dmitriy Ivanov
e057b9fc82 Merge "Introduce size-based r/w allocators" 2014-09-02 17:21:51 +00:00
Dmitriy Ivanov
4cafa3ce80 Merge "Implement LinkedList::visit()" 2014-09-02 16:54:14 +00:00
Elliott Hughes
9685c30a23 Upgrade bionic to tzdata2014g.
From the release notes:

  Changes affecting future time stamps

    Turks & Caicos is switching from US eastern time to UTC-4 year-round,
    modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00.

  Changes affecting past time stamps

    Time in Russia or the USSR before 1926 or so has been corrected by
    a few seconds in the following zones: Asia/Irkutsk,
    Asia/Krasnoyarsk, Asia/Omsk, Asia/Samarkand, Asia/Tbilisi,
    Asia/Vladivostok, Asia/Yakutsk, Europe/Riga, Europe/Samara.  For
    Asia/Yekaterinburg the correction is a few minutes.  (Thanks to
    Vladimir Karpinsky.)

    The Portuguese decree of 1911-05-26 took effect on 1912-01-01.
    This affects 1911 time stamps in Africa/Bissau, Africa/Luanda,
    Atlantic/Azores, and Atlantic/Madeira.  Also, Lisbon's pre-1912
    GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32.
    (Thanks to Stephen Colebourne for pointing to the decree.)

    Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59.

    A new file 'backzone' contains data which may appeal to
    connoisseurs of old time stamps, although it is out of scope for
    the tz database, is often poorly sourced, and contains some data
    that is known to be incorrect.  The new file is not recommended
    for ordinary use and its entries are not installed by default.
    (Thanks to Lester Caine for the high-quality Jersey, Guernsey, and
    Isle of Man entries.)

    Some more zones have been turned into links, when they differed
    from existing zones only for older time stamps.  As usual,
    these changes affect UTC offsets in pre-1970 time stamps only.
    Their old contents have been moved to the 'backzone' file.
    The affected zones are: Africa/Bangui, Africa/Brazzaville,
    Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda,
    Africa/Malabo, Africa/Niamey, and Africa/Porto-Novo.

Bug: 17277574
Change-Id: Idff4a68e927d49bef1e787af534e1b23b5b8a7fb
2014-09-02 09:51:04 -07:00
Dmitriy Ivanov
a492605849 Implement LinkedList::visit()
Change-Id: Ibd9d133dddf1f2e6e65660e3cd2dacafcc0c84d9
2014-09-02 09:45:40 -07:00
Dmitriy Ivanov
0cd83ebb0e Introduce size-based r/w allocators
Change-Id: I75165fc392e5380124039e6db49b0f559c8a518e
2014-09-01 16:17:05 -07:00
Dmitriy Ivanov
5120bcf9f1 Merge "Look into ld_preloads before current library" 2014-09-01 21:16:42 +00:00
Dmitriy Ivanov
c2048944ff Look into ld_preloads before current library
Change lookup order during relocation so that
 ld_preloads always precede caller (unless caller
 is main executable).

 Asan needs this change in order to intercept libc->libc
 calls.

Bug: 15432753
(cherry picked from commit 05e190c093)

Change-Id: I5bfb58e18015b1ec5b77842dbb37fb122fa1fd1a
2014-09-01 14:14:09 -07:00
Dmitriy Ivanov
11387985d2 Merge "Erase elements in LinkedList::remove_if" 2014-09-01 21:06:32 +00:00
Hans Boehm
e505cc66a6 Merge "Make stdatomic.h work with gcc4.6 host compiler" 2014-08-30 00:49:51 +00:00
Dmitriy Ivanov
4bea498544 Erase elements in LinkedList::remove_if
Change-Id: I5119a78c73ffe780a81c53ab5ff0266d5c82d319
2014-08-29 17:09:24 -07:00
Hans Boehm
32429606bf Make stdatomic.h work with gcc4.6 host compiler
This is needed to make L work correctly, and bionic tests pass
again, after applying the equivalent of
commit 00aaea3645 there.

It makes the preexisting code that uses __sync implementations
much more useful, although we should no longer be exercising that
code in AOSP.

Specifically fixes:

We were invoking __has_extension and __has_builtin for GCC compilations.
They're clang specific. Restructured the tests.

The __sync implementation was not defining the LOCK_FREE macros.

ATOMIC_VAR_INIT was using named field initializations.  These are a
C, not C++, feature, that is not supported by g++ 4.6.

The stdatomic bionic test still failed with 4.6 and glibc with our
questionable LOCK_FREE macro implementation.  Don't run that piece
with 4.6.

In L, this is a prerequisite for fixing:

    Bug:16880454
    Bug:16513433

Change-Id: I9b61e42307f96a114dce7552b6ead4ad1c544eab
2014-08-29 17:03:26 -07:00
Elliott Hughes
bbe06e0da1 Merge "Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc." 2014-08-29 23:08:01 +00:00
Elliott Hughes
e0c56efddf Use __GNUC_PREREQ rather than __GNUC_PREREQ__ to match glibc.
Bug: 16874785
Change-Id: I8512f8be3fd149d8720c5c3b4657bedd5ce2b1d1
2014-08-29 15:54:11 -07:00
Dmitriy Ivanov
83b637fa28 Merge "Replace NULL with nullptr" 2014-08-29 22:30:07 +00:00
Dmitriy Ivanov
851135bf99 Replace NULL with nullptr
Change-Id: Iad50be617d318ca98883b843229c960ad5b9afa9
2014-08-29 14:13:48 -07:00
Elliott Hughes
1f39afc8d4 Merge "The host prebuilt glibc is 2.11, so remove workarounds for 2.9." 2014-08-29 18:12:36 +00:00
Chih-Hung Hsieh
cc4259ed92 Merge "Ignore all __weak_alias in OpenBSD libC." 2014-08-29 03:10:44 +00:00
Elliott Hughes
f6824b26ae The host prebuilt glibc is 2.11, so remove workarounds for 2.9.
Change-Id: I1072fcebc8b3018580a9d069fe6eca9c4e74e865
2014-08-28 19:28:35 -07:00
Elliott Hughes
29f06943a1 Merge "Add GNU-compatible strerror_r." 2014-08-29 02:26:34 +00:00
Elliott Hughes
416d7ddaff Add GNU-compatible strerror_r.
We already had the POSIX strerror_r, but some third-party code defines
_GNU_SOURCE and expects to get the GNU strerror_r instead.

This exposed a bug in the libc internal logging functions where unlike
their standard brethren they wouldn't return the number of bytes they'd
have liked to have written.

Bug: 16243479
Change-Id: I1745752ccbdc569646d34f5071f6df2be066d5f4
2014-08-28 16:37:09 -07:00
Chih-Hung Hsieh
b6b5cb5389 Ignore all __weak_alias in OpenBSD libC.
GCC assembler allows xyz to be redeclared as weak,
by __weak_alias(xyz, _xyz), while _xyz is undefined.
Clang does not like that but silently generates no code.
It will reject its own .s file if the assembly code is saved first.
Since we have no reason to define xyz or _xyz as weak symbol now,
and _xyz is a macro to xyz, we simplify libC to have only
xyz defined as global.

BUG: 17186746
Change-Id: I24b154425838683cae69248cc750c59e26fd5467
2014-08-28 15:10:01 -07:00
Elliott Hughes
f4e721dd51 Merge "Have pthread_attr_getstack for the main thread report RLIMIT_STACK..." 2014-08-27 23:43:27 +00:00