OSDN Git Service

android-x86/bionic.git
8 years agoMerge "Fix mips and x86 builds"
Dimitry Ivanov [Thu, 29 Oct 2015 00:56:57 +0000 (00:56 +0000)]
Merge "Fix mips and x86 builds"
am: 50e9279589

* commit '50e92795890c0d8b4bf54c535f66f3b2edf7bd59':
  Fix mips and x86 builds

8 years agoMerge "Fix mips and x86 builds"
Dimitry Ivanov [Thu, 29 Oct 2015 00:53:52 +0000 (00:53 +0000)]
Merge "Fix mips and x86 builds"

8 years agoFix mips and x86 builds
Dmitriy Ivanov [Thu, 29 Oct 2015 00:51:47 +0000 (17:51 -0700)]
Fix mips and x86 builds

Change-Id: Idda2494876fd6bf64b3efe6de2e384da9b6a0dbc

8 years agoMerge "Fix LDFLAGS for arm and x86"
Dimitry Ivanov [Thu, 29 Oct 2015 00:47:16 +0000 (00:47 +0000)]
Merge "Fix LDFLAGS for arm and x86"
am: 5ccad497d4

* commit '5ccad497d43e7587ec5581845e5094488093f76d':
  Fix LDFLAGS for arm and x86

8 years agoMerge "Fix LDFLAGS for arm and x86"
Dimitry Ivanov [Thu, 29 Oct 2015 00:43:00 +0000 (00:43 +0000)]
Merge "Fix LDFLAGS for arm and x86"

8 years agoFix LDFLAGS for arm and x86
Dmitriy Ivanov [Thu, 29 Oct 2015 00:24:43 +0000 (17:24 -0700)]
Fix LDFLAGS for arm and x86

Change-Id: I5366f4499cb4da3a51b8484ab3e4ff785f0888ab

8 years agoMerge "Generate per-architecture version scripts."
Dimitry Ivanov [Wed, 28 Oct 2015 23:51:49 +0000 (23:51 +0000)]
Merge "Generate per-architecture version scripts."
am: 578d949e8d

* commit '578d949e8df782134127b4ae384f731d9d7c6694':
  Generate per-architecture version scripts.

8 years agoMerge "Generate per-architecture version scripts."
Dimitry Ivanov [Wed, 28 Oct 2015 23:44:03 +0000 (23:44 +0000)]
Merge "Generate per-architecture version scripts."

8 years agoMerge "Remove the legacy endusershell/getusershell/setusershell stubs."
Elliott Hughes [Wed, 28 Oct 2015 23:43:05 +0000 (23:43 +0000)]
Merge "Remove the legacy endusershell/getusershell/setusershell stubs."
am: d9146c2404

* commit 'd9146c24041ad571e3725ab630d9ac94df3ff6d1':
  Remove the legacy endusershell/getusershell/setusershell stubs.

8 years agoGenerate per-architecture version scripts.
Dmitriy Ivanov [Wed, 28 Oct 2015 22:14:13 +0000 (15:14 -0700)]
Generate per-architecture version scripts.

Bug: http://b/24767418
Change-Id: I23e49d8d30c0def3215ffbd99d09f207d9483624

8 years agoMerge "Remove the legacy endusershell/getusershell/setusershell stubs."
Elliott Hughes [Wed, 28 Oct 2015 23:35:25 +0000 (23:35 +0000)]
Merge "Remove the legacy endusershell/getusershell/setusershell stubs."

8 years agoRemove the legacy endusershell/getusershell/setusershell stubs.
Elliott Hughes [Wed, 28 Oct 2015 21:20:16 +0000 (14:20 -0700)]
Remove the legacy endusershell/getusershell/setusershell stubs.

These don't work, aren't thread-safe, aren't in POSIX (or our header
files), and are only used by one app (whose developers I've contacted).
But the presence of these symbols causes configure to be confused, which
is a pain for Brillo.

Bug: http://b/24812426
Change-Id: I7fa6ef82864d5563929d9b8a7f8fcacb30b26d45

8 years agoMerge "Implement scandirat and scandirat64."
Elliott Hughes [Tue, 27 Oct 2015 21:57:55 +0000 (21:57 +0000)]
Merge "Implement scandirat and scandirat64."
am: 1721be2229

* commit '1721be2229d07b5eea830f02a76e7be56d172aa9':
  Implement scandirat and scandirat64.

8 years agoMerge "Implement scandirat and scandirat64."
Elliott Hughes [Tue, 27 Oct 2015 21:40:31 +0000 (21:40 +0000)]
Merge "Implement scandirat and scandirat64."

8 years agoImplement scandirat and scandirat64.
Elliott Hughes [Tue, 27 Oct 2015 18:10:36 +0000 (11:10 -0700)]
Implement scandirat and scandirat64.

Bug: http://b/12612339
Change-Id: Id3b249a884fe08964b26a017ae9574961f0cb441

8 years agoMerge "Implement load at fixed address feature"
Dimitry Ivanov [Tue, 27 Oct 2015 19:12:34 +0000 (19:12 +0000)]
Merge "Implement load at fixed address feature"
am: 5238eb0984

* commit '5238eb09844f9c1578353d4c9e297aadb34c71be':
  Implement load at fixed address feature

8 years agoMerge "Implement load at fixed address feature"
Dimitry Ivanov [Tue, 27 Oct 2015 19:03:53 +0000 (19:03 +0000)]
Merge "Implement load at fixed address feature"

8 years agoImplement load at fixed address feature
Dmitriy Ivanov [Wed, 7 Oct 2015 23:34:20 +0000 (16:34 -0700)]
Implement load at fixed address feature

Bug: http://b/24683631
Change-Id: I3a39ab526c8f9e213339b60e135e5459d0f41381

8 years agoMerge "Fix <utmp.h> declarations."
Elliott Hughes [Tue, 27 Oct 2015 15:11:58 +0000 (15:11 +0000)]
Merge "Fix <utmp.h> declarations."
am: 60752a2eea

* commit '60752a2eeab8cd0b344b27c67a47e30628962211':
  Fix <utmp.h> declarations.

8 years agoMerge "Fix <utmp.h> declarations."
Elliott Hughes [Tue, 27 Oct 2015 15:07:12 +0000 (15:07 +0000)]
Merge "Fix <utmp.h> declarations."

8 years agoFix <utmp.h> declarations.
Elliott Hughes [Tue, 27 Oct 2015 02:29:12 +0000 (19:29 -0700)]
Fix <utmp.h> declarations.

If we're going to keep this useless header -- and I think it's too late to
remove it -- it may as well be correct.

Bug: http://b/17700469
Change-Id: Ifec4f8f1a984483d7fa7d81d47786f75b70ff4ba

8 years agoMerge "Remove swap16/swap32/swap64 header pollution."
Elliott Hughes [Tue, 27 Oct 2015 02:11:17 +0000 (02:11 +0000)]
Merge "Remove swap16/swap32/swap64 header pollution."
am: a2cf3783d4

* commit 'a2cf3783d4e9a4008ed468ef3204593f8f549934':
  Remove swap16/swap32/swap64 header pollution.

8 years agoMerge "Remove swap16/swap32/swap64 header pollution."
Elliott Hughes [Tue, 27 Oct 2015 02:07:35 +0000 (02:07 +0000)]
Merge "Remove swap16/swap32/swap64 header pollution."

8 years agoRemove swap16/swap32/swap64 header pollution.
Elliott Hughes [Tue, 27 Oct 2015 00:51:42 +0000 (17:51 -0700)]
Remove swap16/swap32/swap64 header pollution.

This seems to be obsolete BSD stuff, and the only references to it in the
tree are people #undef'ing it.

Bug: http://b/2735009
Change-Id: Icde523ae2d15cf1025357d861f97b415e89e4f9a

8 years agoMerge "Implement Library Load Order Randomization"
Dimitry Ivanov [Mon, 26 Oct 2015 22:38:01 +0000 (22:38 +0000)]
Merge "Implement Library Load Order Randomization"
am: 6a4ddeb56e

* commit '6a4ddeb56ef2144e98437ae82f84b09ea785e411':
  Implement Library Load Order Randomization

8 years agoMerge "Implement Library Load Order Randomization"
Dimitry Ivanov [Mon, 26 Oct 2015 22:30:35 +0000 (22:30 +0000)]
Merge "Implement Library Load Order Randomization"

8 years agoMerge "Fix arm64 fenv warnings, and make warnings errors."
Christopher Ferris [Sat, 24 Oct 2015 16:06:17 +0000 (16:06 +0000)]
Merge "Fix arm64 fenv warnings, and make warnings errors."
am: 1ab8251030

* commit '1ab8251030407ec397009b46db025f8e9688abc8':
  Fix arm64 fenv warnings, and make warnings errors.

8 years agoMerge "Fix arm64 fenv warnings, and make warnings errors."
Christopher Ferris [Sat, 24 Oct 2015 16:00:29 +0000 (16:00 +0000)]
Merge "Fix arm64 fenv warnings, and make warnings errors."

8 years agoFix arm64 fenv warnings, and make warnings errors.
Christopher Ferris [Fri, 23 Oct 2015 22:42:27 +0000 (15:42 -0700)]
Fix arm64 fenv warnings, and make warnings errors.

Even though the control registers being read/written in fenv.c only
have 32 bits that are used, the instructions take a 64 bit register.
Make sure the inline assembler in the macros use 64 bit values.

Verified that before the change and after the change, the disassembly
is exactly the same.

In addition, add -Werror to the cflags.

Change-Id: I6603779327488c23e3aab13300edf2e02b101916

8 years agoMerge "Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC."
Christopher Ferris [Fri, 23 Oct 2015 21:02:56 +0000 (21:02 +0000)]
Merge "Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC."
am: ca430d9787

* commit 'ca430d9787f1c11c2df8e908c64fe2ef2e6d54ed':
  Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC.

8 years agoMerge "refactoring: introduce MappedFileFragment"
Dimitry Ivanov [Fri, 23 Oct 2015 21:02:51 +0000 (21:02 +0000)]
Merge "refactoring: introduce MappedFileFragment"
am: e08ab4b414

* commit 'e08ab4b4144b8c4c920221b403daa220b43df2fb':
  refactoring: introduce MappedFileFragment

8 years agoMerge "Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC."
Christopher Ferris [Fri, 23 Oct 2015 20:56:09 +0000 (20:56 +0000)]
Merge "Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC."

8 years agoMerge "refactoring: introduce MappedFileFragment"
Dimitry Ivanov [Fri, 23 Oct 2015 20:54:00 +0000 (20:54 +0000)]
Merge "refactoring: introduce MappedFileFragment"

8 years agoRename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC.
Christopher Ferris [Fri, 23 Oct 2015 19:32:52 +0000 (12:32 -0700)]
Rename LIBC64_HIDDEN to LIBC32_LEGACY_PUBLIC.

Change-Id: If4da9e46398ca5524f6f0680d70588e3dc7e80b4

8 years agoMerge "Use bionic lock in pthread_internal_t."
Yabin Cui [Fri, 23 Oct 2015 04:32:44 +0000 (04:32 +0000)]
Merge "Use bionic lock in pthread_internal_t."
am: c45f3bf3e6

* commit 'c45f3bf3e691f48af63c5ea2bf7a348a698013ac':
  Use bionic lock in pthread_internal_t.

8 years agoMerge "Use bionic lock in pthread_internal_t."
Yabin Cui [Fri, 23 Oct 2015 04:26:54 +0000 (04:26 +0000)]
Merge "Use bionic lock in pthread_internal_t."

8 years agoUse bionic lock in pthread_internal_t.
Yabin Cui [Fri, 23 Oct 2015 03:07:56 +0000 (20:07 -0700)]
Use bionic lock in pthread_internal_t.

It removes calling to pthread_mutex_lock() at the beginning of new
thread, which helps to support thread sanitizer.

Change-Id: Ia3601c476de7976a9177b792bd74bb200cee0e13

8 years agoImplement Library Load Order Randomization
Dmitriy Ivanov [Thu, 15 Oct 2015 19:07:25 +0000 (12:07 -0700)]
Implement Library Load Order Randomization

Bug: http://b/24047022
Change-Id: I36e05b403bfbaae8542a95147f9114a8b9c8ac0e

8 years agorefactoring: introduce MappedFileFragment
Dmitriy Ivanov [Mon, 19 Oct 2015 23:57:46 +0000 (16:57 -0700)]
refactoring: introduce MappedFileFragment

Change-Id: I97b0c1131711ed0ac13ab33e3357e99e0b6b1a4e

8 years agoMerge "Switch to LOCAL_SRC_FILES_EXCLUDE"
Dan Willemsen [Tue, 20 Oct 2015 20:52:01 +0000 (20:52 +0000)]
Merge "Switch to LOCAL_SRC_FILES_EXCLUDE"
am: 5edf077c5b

* commit '5edf077c5b92f0db212e45ed5402339a6e4c7334':
  Switch to LOCAL_SRC_FILES_EXCLUDE

8 years agoMerge "Switch to LOCAL_SRC_FILES_EXCLUDE"
Dan Willemsen [Tue, 20 Oct 2015 20:44:29 +0000 (20:44 +0000)]
Merge "Switch to LOCAL_SRC_FILES_EXCLUDE"

8 years agoSwitch to LOCAL_SRC_FILES_EXCLUDE
Dan Willemsen [Thu, 15 Oct 2015 21:49:45 +0000 (14:49 -0700)]
Switch to LOCAL_SRC_FILES_EXCLUDE

This moves the generic arm/arm64/x86 settings into the main makefiles
and makes the rest of them derivatives. This better aligns with how
soong handles arch/cpu variants.

Also updates the Android.bp to make it consistent with the make
versions.

Change-Id: I5a0275d992bc657459eb6fe1697ad2336731d122

8 years agoMerge "dlfcn: update ifdef around old_name_"
Mike Frysinger [Tue, 20 Oct 2015 18:31:32 +0000 (18:31 +0000)]
Merge "dlfcn: update ifdef around old_name_"
am: 5c495dacda

* commit '5c495dacdadff9dfbe48be31d4b30c5fe75ac7db':
  dlfcn: update ifdef around old_name_

8 years agoMerge "dlfcn: update ifdef around old_name_"
Mike Frysinger [Tue, 20 Oct 2015 18:23:22 +0000 (18:23 +0000)]
Merge "dlfcn: update ifdef around old_name_"

8 years agodlfcn: update ifdef around old_name_
Mike Frysinger [Tue, 20 Oct 2015 18:06:25 +0000 (14:06 -0400)]
dlfcn: update ifdef around old_name_

Commit 9185e04f72c16d2a66d92ac89b38ee926d7f706b changed the ifdef around
old_name_ from __arm__ to __work_around_b_###__, but missed one place in
dlfcn.cpp.  So if you do a build w/out that workaround for arm, you end
up with a build failure:
bionic/linker/dlfcn.cpp:275:27: error: no member named 'old_name_' in 'soinfo'
    strlcpy(__libdl_info->old_name_, __libdl_info->soname_, sizeof(__libdl_info->old_name_));
            ~~~~~~~~~~~~  ^
bionic/linker/dlfcn.cpp:275:82: error: no member named 'old_name_' in 'soinfo'
    strlcpy(__libdl_info->old_name_, __libdl_info->soname_, sizeof(__libdl_info->old_name_));
                                                                   ~~~~~~~~~~~~  ^

Bug: 24425865
Change-Id: Idbe1cc1c28083afeee6d90203c221f30f661c69c

8 years agoMerge "Remove deprecated use of ldm/stm in ARM setjmp."
Josh Gao [Tue, 20 Oct 2015 01:30:32 +0000 (01:30 +0000)]
Merge "Remove deprecated use of ldm/stm in ARM setjmp."
am: f5ea085844

* commit 'f5ea085844c66e7a65709edd7485a49396e556ce':
  Remove deprecated use of ldm/stm in ARM setjmp.

8 years agoMerge "Remove deprecated use of ldm/stm in ARM setjmp."
Josh Gao [Tue, 20 Oct 2015 01:01:19 +0000 (01:01 +0000)]
Merge "Remove deprecated use of ldm/stm in ARM setjmp."

8 years agoRemove deprecated use of ldm/stm in ARM setjmp.
Josh Gao [Mon, 19 Oct 2015 19:56:50 +0000 (12:56 -0700)]
Remove deprecated use of ldm/stm in ARM setjmp.

ARM deprecates using the SP register in the register lists for ldm
and stm, which LLVM emits a warning for.

Bug: http://b/25017080
Change-Id: Ib427e3dfd5740e251f1ad91ebb66534e0d7b72a9

8 years agoam d29ba555: Merge "Opt Brillo out of the ndk cruft."
Elliott Hughes [Sat, 17 Oct 2015 03:10:48 +0000 (20:10 -0700)]
am d29ba555: Merge "Opt Brillo out of the ndk cruft."

* commit 'd29ba555130f1e61164cf6186cd6a29c7aa14719':
  Opt Brillo out of the ndk cruft.

8 years agoMerge "Opt Brillo out of the ndk cruft."
Elliott Hughes [Sat, 17 Oct 2015 03:06:41 +0000 (03:06 +0000)]
Merge "Opt Brillo out of the ndk cruft."

8 years agoam 5fd94dfe: Merge "Replace auto -> const auto&/auto&&"
Dimitry Ivanov [Fri, 16 Oct 2015 20:41:45 +0000 (13:41 -0700)]
am 5fd94dfe: Merge "Replace auto -> const auto&/auto&&"

* commit '5fd94dfe3b36ee56e54d2002ad3a5e0fa8bff683':
  Replace auto -> const auto&/auto&&

8 years agoam 9c2122e8: Merge "Fix R_AARCH64_ABS/PREL relocations"
Dimitry Ivanov [Fri, 16 Oct 2015 20:41:44 +0000 (13:41 -0700)]
am 9c2122e8: Merge "Fix R_AARCH64_ABS/PREL relocations"

* commit '9c2122e803a01c80bef550eac2b24b5a79635a2a':
  Fix R_AARCH64_ABS/PREL relocations

8 years agoMerge "Replace auto -> const auto&/auto&&"
Dimitry Ivanov [Fri, 16 Oct 2015 20:37:34 +0000 (20:37 +0000)]
Merge "Replace auto -> const auto&/auto&&"

8 years agoMerge "Fix R_AARCH64_ABS/PREL relocations"
Dimitry Ivanov [Fri, 16 Oct 2015 20:36:25 +0000 (20:36 +0000)]
Merge "Fix R_AARCH64_ABS/PREL relocations"

8 years agoFix R_AARCH64_ABS/PREL relocations
Dmitriy Ivanov [Thu, 15 Oct 2015 20:26:03 +0000 (13:26 -0700)]
Fix R_AARCH64_ABS/PREL relocations

According to specification arm64 relocations
should not use *reloc value.

See http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056b/IHI0056B_aaelf64.pdf
section 4.6.5

Bug: http://b/24977219
Bug: http://b/24527155
Change-Id: I3813255771f408ba957963c6ad56ed08e5110d83

8 years agoam 074efa02: Merge "Ensure that readlink has access to /proc/self/fd"
Dimitry Ivanov [Thu, 15 Oct 2015 01:31:15 +0000 (01:31 +0000)]
am 074efa02: Merge "Ensure that readlink has access to /proc/self/fd"

* commit '074efa02a7de67589c36f75222e3b45c3f15206a':
  Ensure that readlink has access to /proc/self/fd

8 years agoMerge "Ensure that readlink has access to /proc/self/fd"
Dimitry Ivanov [Thu, 15 Oct 2015 01:27:17 +0000 (01:27 +0000)]
Merge "Ensure that readlink has access to /proc/self/fd"

8 years agoEnsure that readlink has access to /proc/self/fd
Dmitriy Ivanov [Wed, 14 Oct 2015 18:15:45 +0000 (11:15 -0700)]
Ensure that readlink has access to /proc/self/fd

/proc/self/fd is not available when PR_DUMPABLE is set to 0
which is default for the user builds. It leads to permission
denials on readlink.

This change fixes the problem by setting PR_DUMPABLE flag to 1
for readlink and restoring it's previous value after the call.

Bug: http://b/24912743
Change-Id: I3fd179c5c6b56af96d6a15ee597024ccb15e1a13
(cherry picked from commit cf92738fa5dee24050028a1235f815f2a0fd33b5)

8 years agoam c433a36f: Merge "Move malloc dispatch table to __libc_globals."
Josh Gao [Wed, 14 Oct 2015 23:50:51 +0000 (23:50 +0000)]
am c433a36f: Merge "Move malloc dispatch table to __libc_globals."

* commit 'c433a36fb5fb8a1050e8ecbd94d215123b829e07':
  Move malloc dispatch table to __libc_globals.

8 years agoMerge "Move malloc dispatch table to __libc_globals."
Josh Gao [Wed, 14 Oct 2015 23:47:41 +0000 (23:47 +0000)]
Merge "Move malloc dispatch table to __libc_globals."

8 years agoam 198d13e8: Merge "make mmap fail on requests larger than PTRDIFF_MAX"
Josh Gao [Wed, 14 Oct 2015 02:21:04 +0000 (02:21 +0000)]
am 198d13e8: Merge "make mmap fail on requests larger than PTRDIFF_MAX"

* commit '198d13e8c25e69f7dbda3f5e1a3258b13fe8db5d':
  make mmap fail on requests larger than PTRDIFF_MAX

8 years agoMerge "make mmap fail on requests larger than PTRDIFF_MAX"
Josh Gao [Wed, 14 Oct 2015 02:17:10 +0000 (02:17 +0000)]
Merge "make mmap fail on requests larger than PTRDIFF_MAX"

8 years agoam 11c2179d: Merge "Log dlopen failures caused by text relocations"
Dimitry Ivanov [Tue, 13 Oct 2015 22:53:03 +0000 (22:53 +0000)]
am 11c2179d: Merge "Log dlopen failures caused by text relocations"

* commit '11c2179d468bba3336c3a3e8418ddaa98f58afce':
  Log dlopen failures caused by text relocations

8 years agoMerge "Log dlopen failures caused by text relocations"
Dimitry Ivanov [Tue, 13 Oct 2015 22:50:05 +0000 (22:50 +0000)]
Merge "Log dlopen failures caused by text relocations"

8 years agoLog dlopen failures caused by text relocations
Dmitriy Ivanov [Tue, 13 Oct 2015 18:07:56 +0000 (11:07 -0700)]
Log dlopen failures caused by text relocations

Some apps will fail to load native libraries with
text relocations when switching target sdk version to M.
It could be hard to diagnose because some of them
suppress dlerror and/or UnsatisfiedLinkError.

This change unconditionally logs the error message making
the cause of the failure more visible to developers.

Bug: http://b/24876001
Change-Id: I0477a0d1307d0879000f3a3a43b974b4cf34bdb2
(cherry picked from commit f32b689d3dbe7a1317bce58d1d9bef9bba173c66)

8 years agoam 30cd7065: Merge "Correctly resolve realpath for absolute paths"
Dimitry Ivanov [Tue, 13 Oct 2015 20:43:36 +0000 (20:43 +0000)]
am 30cd7065: Merge "Correctly resolve realpath for absolute paths"

* commit '30cd7065b6cd37342e23904cb512c409b8bbd4f1':
  Correctly resolve realpath for absolute paths

8 years agoMerge "Correctly resolve realpath for absolute paths"
Dimitry Ivanov [Tue, 13 Oct 2015 20:37:55 +0000 (20:37 +0000)]
Merge "Correctly resolve realpath for absolute paths"

8 years agoReplace auto -> const auto&/auto&&
Dmitriy Ivanov [Tue, 13 Oct 2015 19:14:16 +0000 (12:14 -0700)]
Replace auto -> const auto&/auto&&

Change-Id: Ie484e5a296b5dd222a9545d8539d40d97a6c158c

8 years agoCorrectly resolve realpath for absolute paths
Lazar Trsic [Tue, 13 Oct 2015 14:43:00 +0000 (16:43 +0200)]
Correctly resolve realpath for absolute paths

Introduced by: https://android-review.googlesource.com/174475

Change-Id: I44e00040b28be167d5141454f919340afec6084e

8 years agoam fb7f45b6: Merge "Update timezone data to 2015g"
Neil Fuller [Tue, 13 Oct 2015 09:14:17 +0000 (09:14 +0000)]
am fb7f45b6: Merge "Update timezone data to 2015g"

* commit 'fb7f45b6a3242c9a9a547705de08cf59e6b7f935':
  Update timezone data to 2015g

8 years agoMerge "Update timezone data to 2015g"
Neil Fuller [Tue, 13 Oct 2015 08:26:44 +0000 (08:26 +0000)]
Merge "Update timezone data to 2015g"

8 years agoam a5ad727e: Merge "linker: Switch to clang"
Dimitry Ivanov [Tue, 13 Oct 2015 01:40:49 +0000 (01:40 +0000)]
am a5ad727e: Merge "linker: Switch to clang"

* commit 'a5ad727e7619f4497792d67ae05b8ef15315b362':
  linker: Switch to clang

8 years agoMerge "linker: Switch to clang"
Dimitry Ivanov [Tue, 13 Oct 2015 01:34:59 +0000 (01:34 +0000)]
Merge "linker: Switch to clang"

8 years agolinker: Switch to clang
Dmitriy Ivanov [Mon, 12 Oct 2015 23:27:32 +0000 (16:27 -0700)]
linker: Switch to clang

x86_64 gcc exports malloc/free and co functions because they
are defined with visibility "default" somewhere in gcc builtins;
and vector d-tors for some reason. Switching to clang fixes
this problem.

Bug: http://b/24785482
Change-Id: I741503b4b446523e7ff3fb16de13ed99991fd0c0

8 years agoMove malloc dispatch table to __libc_globals.
Josh Gao [Thu, 8 Oct 2015 21:49:26 +0000 (14:49 -0700)]
Move malloc dispatch table to __libc_globals.

Change-Id: Ic20b980d1e8b6c2d4b773ebe336658fd17c737cb

8 years agoOpt Brillo out of the ndk cruft.
Elliott Hughes [Tue, 13 Oct 2015 00:53:48 +0000 (17:53 -0700)]
Opt Brillo out of the ndk cruft.

Bug: http://b/24812426
Change-Id: I6a858d8ceebce9e2285e5b12de9fd89d2b42b352

8 years agoam 25cba7df: Merge "Make struct FILE opaque."
Elliott Hughes [Mon, 12 Oct 2015 20:40:41 +0000 (20:40 +0000)]
am 25cba7df: Merge "Make struct FILE opaque."

* commit '25cba7df5120a32b144769843781442031fc597b':
  Make struct FILE opaque.

8 years agoMerge "Make struct FILE opaque."
Elliott Hughes [Mon, 12 Oct 2015 20:33:04 +0000 (20:33 +0000)]
Merge "Make struct FILE opaque."

8 years agoMake struct FILE opaque.
Elliott Hughes [Mon, 12 Oct 2015 19:44:23 +0000 (12:44 -0700)]
Make struct FILE opaque.

Bug: http://b/24807045
Change-Id: I3cb4e436325a65bef3b203e3970e4d967101fcce

8 years agoam e7839263: Merge "Fix stdio read after EOF behavior."
Elliott Hughes [Mon, 12 Oct 2015 15:23:48 +0000 (15:23 +0000)]
am e7839263: Merge "Fix stdio read after EOF behavior."

* commit 'e78392637d5086384a5631ddfdfa8d7ec8326ee3':
  Fix stdio read after EOF behavior.

8 years agoMerge "Fix stdio read after EOF behavior."
Elliott Hughes [Mon, 12 Oct 2015 15:20:29 +0000 (15:20 +0000)]
Merge "Fix stdio read after EOF behavior."

8 years agoFix stdio read after EOF behavior.
Elliott Hughes [Sat, 10 Oct 2015 00:57:26 +0000 (17:57 -0700)]
Fix stdio read after EOF behavior.

Bug: https://code.google.com/p/android/issues/detail?id=184847
Change-Id: Ia20ce94007c2a09649f0763b1dc7ba959f2f618d

8 years agoam 1ab3f303: Merge "Fix inet_aton on LP32."
Elliott Hughes [Sat, 10 Oct 2015 00:44:51 +0000 (00:44 +0000)]
am 1ab3f303: Merge "Fix inet_aton on LP32."

* commit '1ab3f303d2e7c8cc498a28fc3c8d9ded1fc46994':
  Fix inet_aton on LP32.

8 years agoMerge "Fix inet_aton on LP32."
Elliott Hughes [Sat, 10 Oct 2015 00:39:11 +0000 (00:39 +0000)]
Merge "Fix inet_aton on LP32."

8 years agoFix inet_aton on LP32.
Elliott Hughes [Sat, 10 Oct 2015 00:27:41 +0000 (17:27 -0700)]
Fix inet_aton on LP32.

I wasn't checking for overflow. Luckily, I had a test that overflows on LP32.

Change-Id: If2cf33d88f459eb26d0ce75f3c5ed192f516ab7a

8 years agoam c6f704bf: Merge "utmp.h: add more ut_type defines"
Mike Frysinger [Fri, 9 Oct 2015 23:37:18 +0000 (23:37 +0000)]
am c6f704bf: Merge "utmp.h: add more ut_type defines"

* commit 'c6f704bf77576b2cf27decd8ee50c99aeeb9e209':
  utmp.h: add more ut_type defines

8 years agoMerge "utmp.h: add more ut_type defines"
Mike Frysinger [Fri, 9 Oct 2015 23:33:37 +0000 (23:33 +0000)]
Merge "utmp.h: add more ut_type defines"

8 years agoam 902ab885: Merge "Move setjmp cookie to a shared globals struct."
Josh Gao [Fri, 9 Oct 2015 23:33:32 +0000 (23:33 +0000)]
am 902ab885: Merge "Move setjmp cookie to a shared globals struct."

* commit '902ab8859f360d81d6bd03a76a77900743018a15':
  Move setjmp cookie to a shared globals struct.

8 years agoam 73a91218: Merge "Move VDSO pointers to a shared globals struct."
Josh Gao [Fri, 9 Oct 2015 23:33:30 +0000 (23:33 +0000)]
am 73a91218: Merge "Move VDSO pointers to a shared globals struct."

* commit '73a91218d1f0b334b97648461b19eed96e6c4336':
  Move VDSO pointers to a shared globals struct.

8 years agoMerge "Move setjmp cookie to a shared globals struct."
Josh Gao [Fri, 9 Oct 2015 23:27:07 +0000 (23:27 +0000)]
Merge "Move setjmp cookie to a shared globals struct."

8 years agoMerge "Move VDSO pointers to a shared globals struct."
Josh Gao [Fri, 9 Oct 2015 23:26:53 +0000 (23:26 +0000)]
Merge "Move VDSO pointers to a shared globals struct."

8 years agoMove setjmp cookie to a shared globals struct.
Josh Gao [Wed, 7 Oct 2015 21:32:36 +0000 (14:32 -0700)]
Move setjmp cookie to a shared globals struct.

Change-Id: I59a4c187d61524c4e48655c4c6376dba0d41eee2

8 years agoMove VDSO pointers to a shared globals struct.
Josh Gao [Tue, 6 Oct 2015 18:08:13 +0000 (11:08 -0700)]
Move VDSO pointers to a shared globals struct.

Change-Id: I01cbc9cf0917dc1fac52d9205bda2c68529d12ef

8 years agoam 487a1823: Merge "Fix inet_addr/inet_aton/inet_network."
Elliott Hughes [Fri, 9 Oct 2015 22:53:45 +0000 (22:53 +0000)]
am 487a1823: Merge "Fix inet_addr/inet_aton/inet_network."

* commit '487a1823e8617011009eded8eae9a75c1f871887':
  Fix inet_addr/inet_aton/inet_network.

8 years agoutmp.h: add more ut_type defines
Mike Frysinger [Fri, 9 Oct 2015 22:48:51 +0000 (18:48 -0400)]
utmp.h: add more ut_type defines

This fills out the defines that utmp.h normally offers on other systems
such as glibc.

BUG=24810744

Change-Id: If57f9ced22e8673f072245fce3f5c0f8e1f591e5

8 years agoMerge "Fix inet_addr/inet_aton/inet_network."
Elliott Hughes [Fri, 9 Oct 2015 22:48:13 +0000 (22:48 +0000)]
Merge "Fix inet_addr/inet_aton/inet_network."

8 years agoFix inet_addr/inet_aton/inet_network.
Elliott Hughes [Fri, 9 Oct 2015 01:04:49 +0000 (18:04 -0700)]
Fix inet_addr/inet_aton/inet_network.

Rewrite inet_addr and inet_network in terms of inet_aton, and reimplement
that to include all the missing error checks.

Bug: http://b/24754503
Change-Id: I5dfa971c87201968985a0894df419f0fbf54768a

8 years agoam f41fe717: Merge "Sync with upstream tzcode (2015g)."
Elliott Hughes [Fri, 9 Oct 2015 22:42:25 +0000 (22:42 +0000)]
am f41fe717: Merge "Sync with upstream tzcode (2015g)."

* commit 'f41fe717655f01affc1d8244ff9efccc04d86620':
  Sync with upstream tzcode (2015g).

8 years agoMerge "Sync with upstream tzcode (2015g)."
Elliott Hughes [Fri, 9 Oct 2015 22:35:24 +0000 (22:35 +0000)]
Merge "Sync with upstream tzcode (2015g)."

8 years agoSync with upstream tzcode (2015g).
Elliott Hughes [Thu, 8 Oct 2015 00:13:40 +0000 (17:13 -0700)]
Sync with upstream tzcode (2015g).

This is quite a large patch because we haven't updated for some time,
but the good news is that upstream is now thread-safe so a lot of our
changes go away in this update and the remaining diff is a lot smaller.

(Note that our whitespace still doesn't match upstream. I use diff -wub
to compare. Upstream doesn't even really have a consistent style. New
code seems to be two spaces, old code tabs.)

From the intervening changelogs (eliding the changes that only affected
the tools, which we don't use):

2014a:
     An uninitialized-storage bug in 'localtime' has been fixed.
     (Thanks to Logan Chien.)

2014b:
     'zic' and 'localtime' no longer reject locations needing four
     transitions per year for the forseeable future.  (Thanks to Andrew
     Main (Zefram).)

2014c:
     <None>

2014d:
     <None>

2014e:
     <None>

2014f:
     'localtime', 'mktime', etc. now use much less stack space if
     ALL_STATE is defined.  (Thanks to Elliott Hughes for reporting the
     problem.)

     Some lint has been removed when using GCC_DEBUG_FLAGS with GCC
     4.9.0.

2014g:
     Unless NETBSD_INSPIRED is defined to 0, the tz library now
     supplies functions for creating and using objects that represent
     time zones. The new functions are tzalloc, tzfree, localtime_rz,
     mktime_z, and (if STD_INSPIRED is also defined) posix2time_z and
     time2posix_z.  They are intended for performance: for example,
     localtime_rz (unlike localtime_r) is trivially thread-safe without
     locking.  (Thanks to Christos Zoulas for proposing NetBSD-inspired
     functions, and to Alan Barrett and Jonathan Lennox for helping to
     debug the change.)

     If THREAD_SAFE is defined to 1, the tz library is now thread-safe.
     Although not needed for tz's own applications, which are single-threaded,
     this supports POSIX better if the tz library is used in multithreaded apps.

     Some crashes have been fixed when zdump or the tz library is given
     invalid or outlandish input.

     The tz library no longer mishandles leap seconds on platforms with
     unsigned time_t in time zones that lack ordinary transitions after 1970.

     The tz code now attempts to infer TM_GMTOFF and TM_ZONE if not
     already defined, to make it easier to configure on common platforms.
     Define NO_TM_GMTOFF and NO_TM_ZONE to suppress this.

     Unless the new macro UNINIT_TRAP is defined to 1, the tz code now
     assumes that reading uninitialized memory yields garbage values
     but does not cause other problems such as traps.

     If TM_GMTOFF is defined and UNINIT_TRAP is 0, mktime is now
     more likely to guess right for ambiguous time stamps near
     transitions where tm_isdst does not change.

     If HAVE_STRFTIME_L is defined to 1, the tz library now defines
     strftime_l for compatibility with recent versions of POSIX.
     Only the C locale is supported, though.  HAVE_STRFTIME_L defaults
     to 1 on recent POSIX versions, and to 0 otherwise.

     tzselect -c now uses a hybrid distance measure that works better
     in Africa.  (Thanks to Alan Barrett for noting the problem.)

     The C source code now ports to NetBSD when GCC_DEBUG_FLAGS is used,
     or when time_tz is defined.

     When HAVE_UTMPX_H is set the 'date' command now builds on systems
     whose <utmpx.h> file does not define WTMPX_FILE, and when setting
     the date it updates the wtmpx file if _PATH_WTMPX is defined.
     This affects GNU/Linux and similar systems.

     For easier maintenance later, some C code has been simplified,
     some lint has been removed, and the code has been tweaked so that
     plain 'make' is more likely to work.

     The C type 'bool' is now used for boolean values, instead of 'int'.

     The long-obsolete LOCALE_HOME code has been removed.

     The long-obsolete 'gtime' function has been removed.

2014h:
     The tz library's localtime and mktime functions now set tzname to a value
     appropriate for the requested time stamp, and zdump now uses this
     on platforms not defining TM_ZONE, fixing a 2014g regression.
     (Thanks to Tim Parenti for reporting the problem.)

     The tz library no longer sets tzname if localtime or mktime fails.

     An access to uninitalized data has been fixed.
     (Thanks to Jörg Richter for reporting the problem.)

     When THREAD_SAFE is defined, the code ports to the C11 memory model.
     A memory leak has been fixed if ALL_STATE and THREAD_SAFE are defined
     and two threads race to initialize data used by gmtime-like functions.
     (Thanks to Andy Heninger for reporting the problems.)

2014i:
     The time-related library functions now set errno on failure,
     and some crashes in the new tzalloc-related library functions
     have been fixed.  (Thanks to Christos Zoulas for reporting
     most of these problems and for suggesting fixes.)

     If USG_COMPAT is defined and the requested time stamp is
     standard time, the tz library's localtime and mktime functions
     now set the extern variable timezone to a value appropriate
     for that time stamp; and similarly for ALTZONE, daylight
     saving time, and the altzone variable.  This change is a
     companion to the tzname change in 2014h, and is designed to
     make timezone and altzone more compatible with tzname.

     The tz library's functions now set errno to EOVERFLOW if they
     fail because the result cannot be represented.  ctime and
     ctime_r now return NULL and set errno when a time stamp is out
     of range, rather than having undefined behavior.

     Some bugs associated with the new 2014g functions have been
     fixed.  This includes a bug that largely incapacitated the new
     functions time2posix_z and posix2time_z.  (Thanks to Christos
     Zoulas.)  It also includes some uses of uninitialized
     variables after tzalloc.  The new code uses the standard type
     'ssize_t', which the Makefile now gives porting advice about.

2014j:
     <None>

2015a:
     tzalloc now scrubs time zone abbreviations compatibly with the way
     that tzset always has, by replacing invalid bytes with '_' and by
     shortening too-long abbreviations.

2015b:
     Fix integer overflow bug in reference 'mktime' implementation.
     (Problem reported by Jörg Richter.)

     Allow -Dtime_tz=time_t compilations, and allow -Dtime_tz=... libraries
     to be used in the same executable as standard-library time_t functions.
     (Problems reported by Bradley White.)

2015c:
     <None>

2015d:
     <None>

2015e:
     <None>

2015f:
     <None>

2015g:
    localtime no longer mishandles America/Anchorage after 2037.
    (Thanks to Bradley White for reporting the bug.)

    On hosts with signed 32-bit time_t, localtime no longer mishandles
    Pacific/Fiji after 2038-01-16 14:00 UTC.

    The localtime module allows the variables 'timezone', 'daylight',
    and 'altzone' to be in common storage shared with other modules,
    and declares them in case the system <time.h> does not.
    (Problems reported by Kees Dekker.)

    On platforms with tm_zone, strftime.c now assumes it is not NULL.
    This simplifies the code and is consistent with zdump.c.
    (Problem reported by Christos Zoulas.)

Change-Id: I9eb0a8323cb8bd9968fcfe612dc14f45aa3b59d2