Commit graph

15708 commits

Author SHA1 Message Date
Elliott Hughes
ffe5c24c86 Merge "Fix potential race condition on CTS TC pthread_gettid_np" 2015-11-11 21:21:33 +00:00
Junjie Hu
de1246202a Fix potential race condition on CTS TC pthread_gettid_np
Root cause:
If start_routine thread exits before pthread_gettid_np is invokded, the "tid" field
will be cleared so that pthread_gettid_np will get "0" (which is cleared by kernel, 
due to the flag "CLONE_CHILD_CLEARTID" is set while calling clone system call inside
pthread_create).

Proposed patch:
Use a mutex to guarantee pthread_gettid_np will be invoked and returned before the
start_routine exits

Signed-off-by: Junjie Hu <junjie.hu@mediatek.com>

Change-Id: I22411f1b0f7446d76a0373cef4ccec858fac7018
(cherry picked from commit 4f80102935)
2015-11-11 21:21:21 +00:00
Nick Kralevich
6209b99a73 Merge "libc_init_common.cpp: Clarify when environment stripping occurs" 2015-11-11 02:06:59 +00:00
Nick Kralevich
2fb02651c8 libc_init_common.cpp: Clarify when environment stripping occurs
The current comment implies that we only strip sensitive
environment variables on executing a setuid program. This is
true but incomplete. The AT_SECURE flag is set whenever a
security transition occurs, such as executing a setuid program,
SELinux security transition, executing a file with file capabilities,
etc...

Fixup the comments.

Change-Id: I30a73992adfde14d6e5f642b3a1ead2ee56726be
2015-11-10 16:45:49 -08:00
Tom Cherry
2a7f1b335d Merge "Refactor prop_area into a class" 2015-11-10 21:54:39 +00:00
Tom Cherry
926ebe1094 Refactor prop_area into a class
Bug 21852512

Change-Id: I432bf592f1a71a046c32616fc334ad77c220f0ca
2015-11-09 17:22:44 -08:00
Josh Gao
11b3916b83 Merge "Fix test failure." 2015-11-10 00:08:09 +00:00
Josh Gao
09fac86ca3 Fix test failure.
Bug: http://b/25596173
Change-Id: I0cf8f550837d4a936d6a784063a0ec9509150358
2015-11-09 16:04:50 -08:00
Dan Willemsen
704e048cbf Merge "Update Android.bp with latest Android.mk changes" 2015-11-09 22:28:18 +00:00
Dan Willemsen
dc6b0a7b93 Update Android.bp with latest Android.mk changes
Change-Id: I45f6292fcc4d4559519d88f948b4478204b08f25
2015-11-09 14:03:46 -08:00
Yabin Cui
0e6542b75b Merge "Add fileno_unlocked to support thread sanitizer." 2015-11-07 00:24:52 +00:00
Yabin Cui
fb994f4c04 Add fileno_unlocked to support thread sanitizer.
Bug: 25392375
Change-Id: If3f92a0e08a53f4b59e01397e8efa307d8572349
2015-11-06 16:13:47 -08:00
Elliott Hughes
8b5b2c4672 Merge "fix the mremap signature" 2015-11-06 21:18:08 +00:00
Daniel Micay
4200e260d2 fix the mremap signature
The mremap definition was incorrect (unsigned long instead of int) and
it was missing the optional new_address parameter.

Change-Id: Ib9d0675aaa098c21617cedc9b2b8cf267be3aec4
2015-11-06 13:14:43 -08:00
Dimitry Ivanov
3482613685 Merge "linker: cleanup solist after unsuccessful read" 2015-11-06 19:00:24 +00:00
Dmitriy Ivanov
fd7a91e692 linker: cleanup solist after unsuccessful read
Bug: http://b/25560017
Change-Id: I03c5a1d7aed34c480d341aacfb3b1afdfa037b99
2015-11-06 10:44:37 -08:00
Dimitry Ivanov
004fead6bc Merge "Fix linked_list::remove_if()" 2015-11-06 02:32:34 +00:00
Dmitriy Ivanov
7a9311f7f1 Fix linked_list::remove_if()
When remove_if removes last element from the list
following push_back stops working.

Change-Id: Ia3e92763b83a2e172eaa10de7aecfb7a4be452d7
2015-11-05 17:41:05 -08:00
Colin Cross
ef5e647891 Merge "Use cc_defaults" 2015-11-05 01:56:58 +00:00
Josh Gao
dd7dcfcfdb Merge "Fix GNU/POSIX basename headers." 2015-11-04 22:26:13 +00:00
Josh Gao
eb9b925012 Fix GNU/POSIX basename headers.
Including glibc's <libgen.h> will result in the user getting the POSIX
version of basename always, regardless of when it is included relative
to <string.h>. Prior to this patch, our implementation would result in
the one that's included first winning.

Bug: http://b/25459151
Change-Id: Id4aaf1670dad317d6bbc05763a84ee87596e8e59
2015-11-04 14:19:55 -08:00
Colin Cross
50c21ab47d Use cc_defaults
Use a cc_defaults module to reduce duplication.

Change-Id: Iaee6bf20b84123babcdc68d4feb06308f5f61a59
2015-11-03 17:25:36 -08:00
Dan Willemsen
4b920f042a Merge "Update Android.bp with arch-specific version scripts" 2015-11-03 22:38:23 +00:00
Dan Willemsen
9e6f98fe9d Update Android.bp with arch-specific version scripts
Change-Id: I59b34f21b54e8a2084bb318a08c4092064f48083
2015-11-03 14:30:57 -08:00
Josh Gao
af909869d8 Merge "fix PTRDIFF_MAX check in the 32-bit mmap wrapper" 2015-11-03 19:35:05 +00:00
Daniel Micay
706186d266 fix PTRDIFF_MAX check in the 32-bit mmap wrapper
It wasn't making use of the page-rounded size.

Change-Id: I911345fcfd6419a4dbc18a4622b42e1b76729abb
2015-11-03 05:30:29 -05:00
Christopher Ferris
9fe02f3e3c Merge "Fix comment to reflect the actual reality."
am: e07558fb80

* commit 'e07558fb80da4e196e8b7e371041c1e75c56b29b':
  Fix comment to reflect the actual reality.
2015-11-02 21:10:19 +00:00
Christopher Ferris
e07558fb80 Merge "Fix comment to reflect the actual reality." 2015-11-02 21:07:04 +00:00
Christopher Ferris
384ffe3463 Fix comment to reflect the actual reality.
The original comment implied that Android 32 bit was the only one
using a bad time_t, but it turns out 32 bit glibc has the same time_t
as Android. Update the comment to reflect this reality.

Change-Id: I72cdd2c677a6521f7b43d4695a52fd8fdc3305bd
2015-11-02 12:56:37 -08:00
Dimitry Ivanov
86bf87c054 Merge "Generate libdl.so per-architecture version script"
am: 75dd3710e7

* commit '75dd3710e72e819ce6710e93672f937550ed3818':
  Generate libdl.so per-architecture version script
2015-10-31 18:20:28 +00:00
Dimitry Ivanov
75dd3710e7 Merge "Generate libdl.so per-architecture version script" 2015-10-31 18:17:17 +00:00
Christopher Ferris
0ba085de2c Merge "Make _signal hidden in all cases."
am: 6a8a09f7c4

* commit '6a8a09f7c40fb677a8dc8a233b58f62df8ae79dc':
  Make _signal hidden in all cases.
2015-10-31 16:15:17 +00:00
Christopher Ferris
6a8a09f7c4 Merge "Make _signal hidden in all cases." 2015-10-31 16:11:48 +00:00
Dmitriy Ivanov
bc75047a1b Generate libdl.so per-architecture version script
Bug: http://b/24767418
Change-Id: I3d5775ba44d4c8e7fc5f2fbebae10e022100f1e2
2015-10-30 17:43:27 -07:00
Christopher Ferris
1721cd6a74 Make _signal hidden in all cases.
_signal was static in 64 bit, and hidden on 32 bit. There is no
reason to have this distinction, so make it hidden in all cases.

Change-Id: I09d5d93ac8cab4fe14dc7bdfeb25aa46a3b7413d
2015-10-30 17:10:47 -07:00
Elliott Hughes
a8f69017e5 Merge "Add prlimit to LP32."
am: c36be975ce

* commit 'c36be975ce4525b452435f43beb1fb9fc26a7fdc':
  Add prlimit to LP32.
2015-10-30 23:40:48 +00:00
Elliott Hughes
c36be975ce Merge "Add prlimit to LP32." 2015-10-30 23:35:40 +00:00
Elliott Hughes
caa61b03b2 Merge "Remove <sys/shm.h>."
am: bdac9ec142

* commit 'bdac9ec142347a0dc9784bddd0f8336535e73529':
  Remove <sys/shm.h>.
2015-10-30 22:16:58 +00:00
Elliott Hughes
bdac9ec142 Merge "Remove <sys/shm.h>." 2015-10-30 22:06:26 +00:00
Christopher Ferris
6297e3231c Merge "Move __set_errno to ndk_cruft.cpp."
am: e75453d5dd

* commit 'e75453d5dd8b373f6e7ef61ec22a6a3074d51e02':
  Move __set_errno to ndk_cruft.cpp.
2015-10-30 16:06:45 +00:00
Christopher Ferris
e75453d5dd Merge "Move __set_errno to ndk_cruft.cpp." 2015-10-30 16:02:01 +00:00
Elliott Hughes
38eca07826 Remove <sys/shm.h>.
Android doesn't allow SysV IPC, so this only serves two purposes. It's
good in that it helps random code (especially code that doesn't actually
need this header) to compile anyway. But it's bad for the same reason:
it's misleading for configure scripts that test for the header but not
for the corresponding functions.

Bug: http://b/19340456
Change-Id: I4a5f319d9aecf46fc512fc94bb4f9e3f6ea64e71
2015-10-29 19:52:44 -07:00
Christopher Ferris
9978a9a82e Move __set_errno to ndk_cruft.cpp.
Change-Id: I5caa1cc161961d2e4629429c0d406875b93cdbd0
2015-10-29 18:11:32 -07:00
Elliott Hughes
4151db5f99 Add prlimit to LP32.
Bug: http://b/24918750
Change-Id: I0151cd66ccf79a6169610de35bb9c288c0fa4917
2015-10-28 20:04:59 -07:00
Dimitry Ivanov
fedb167c55 Merge "Fix mips and x86 builds"
am: 50e9279589

* commit '50e92795890c0d8b4bf54c535f66f3b2edf7bd59':
  Fix mips and x86 builds
2015-10-29 00:56:57 +00:00
Dimitry Ivanov
50e9279589 Merge "Fix mips and x86 builds" 2015-10-29 00:53:52 +00:00
Dmitriy Ivanov
c176440c90 Fix mips and x86 builds
Change-Id: Idda2494876fd6bf64b3efe6de2e384da9b6a0dbc
2015-10-28 17:51:47 -07:00
Dimitry Ivanov
bd5bf272a0 Merge "Fix LDFLAGS for arm and x86"
am: 5ccad497d4

* commit '5ccad497d43e7587ec5581845e5094488093f76d':
  Fix LDFLAGS for arm and x86
2015-10-29 00:47:16 +00:00
Dimitry Ivanov
5ccad497d4 Merge "Fix LDFLAGS for arm and x86" 2015-10-29 00:43:00 +00:00
Dmitriy Ivanov
e85fb580c8 Fix LDFLAGS for arm and x86
Change-Id: I5366f4499cb4da3a51b8484ab3e4ff785f0888ab
2015-10-28 17:25:34 -07:00