Commit graph

29873 commits

Author SHA1 Message Date
Dan Albert
7e5db5bfcd Merge "Link libc++demangle."
am: 74e56438bb

Change-Id: I3e845c7cf2e722896928bdcd100181398c9f13a4
2019-08-21 17:24:19 -07:00
Treehugger Robot
74e56438bb Merge "Link libc++demangle." 2019-08-21 23:54:48 +00:00
Josh Gao
bfa725b254 Merge "Reland "fdsan: make fatal by default.""
am: 28cf07f93d

Change-Id: If59ada291c8a7a8632b4ce9de189cca353d72112
2019-08-21 01:15:12 -07:00
Treehugger Robot
28cf07f93d Merge "Reland "fdsan: make fatal by default."" 2019-08-21 07:57:28 +00:00
Jooyung Han
39699ea095 linker: cleanup (removing unused VNDK_VER)
VNDK_VER runtime variable in the linker config file is not used any
more.

Test: m
Change-Id: Id08add6d0259a420ff4819f33093ce388bb3cbe9
2019-08-21 15:04:58 +09:00
Elliott Hughes
1011864f41 Merge "Automatically include <android/ndk-version.h> from every header."
am: d4e1db56b8

Change-Id: Icfeb5f6be9eb180b4ae4eb2594817f0f0d0d9086
2019-08-20 18:20:21 -07:00
Josh Gao
6a51013728 Reland "fdsan: make fatal by default."
The two tests known to be failing (installd_dexopt_test and BpfMapTest)
have been fixed, so let's try this again.

This reverts commit 76351e3e3f.

Bug: http://b/137788030
Bug: http://b/139092341
Bug: http://b/139175951
Test: treehugger
2019-08-20 17:59:14 -07:00
Treehugger Robot
d4e1db56b8 Merge "Automatically include <android/ndk-version.h> from every header." 2019-08-21 00:35:20 +00:00
Elliott Hughes
f69d852f27 Automatically include <android/ndk-version.h> from every header.
(Via <sys/cdefs.h>, which is where we get <android/api-level.h> from.)

Not super helpful today, but when NDK r21 is the oldest NDK anyone cares
about, they'll be able to stop worrying about this specific header as
long as they've included _something_.

Test: builds
Change-Id: Ia5bc42f89b7025d8e3963e4fd590f0e3723157be
2019-08-20 13:18:57 -07:00
Yi Kong
e39a51bfd4 Fix segment gap test
The test starts failing in the upcoming lld update. The root cause is
that no relro section is specified by the linker script, and the orphan
placement algorithm decides to place them after .text which is a
misaligned place.

Test: bionic-unit-tests
Bug: 139089152
Bug: 131328001
Change-Id: I2140d8a9fd7c712f1d31a541a3b4a10788385e98
2019-08-17 22:41:25 +00:00
Peter Collingbourne
752b619240 Merge "Fix a few bionic test failures caused by hwasan global instrumentation."
am: 3952113d90

Change-Id: I17d6e9c5448b081c6833af6fc1ec247c997bfc59
2019-08-16 10:56:35 -07:00
Peter Collingbourne
3952113d90 Merge "Fix a few bionic test failures caused by hwasan global instrumentation." 2019-08-16 17:26:05 +00:00
Elliott Hughes
8217b96a12 Merge "Link our two main developer-facing docs together."
am: 5f112cd756

Change-Id: I9a67afbf4c2c013f3af7b3c432e212bd31b2009e
2019-08-15 19:38:37 -07:00
Treehugger Robot
5f112cd756 Merge "Link our two main developer-facing docs together." 2019-08-16 02:08:22 +00:00
Peter Collingbourne
191ecdc49b Fix a few bionic test failures caused by hwasan global instrumentation.
The call to the load hook needs to be moved before the call to link_image()
because the latter calls ifunc resolvers which might access global
variables. This fixes a bunch of ifunc tests.

The dlfcn.segment_gap test is currently failing. One problem is that the name
of the .bss.end_of_gap section changes as a result of global instrumentation.
Add some wildcards in so that we match both names. The other problem seems
to be the same as b/139089152.

It turns out that we need to untag pointers in a few more places. Since we have
quite a few of these now it seems worth creating a function for it.

Test: bionic-unit-tests
Change-Id: I44e2b0904faacdda7cc0c5e844ffc09de01dea2d
2019-08-15 09:21:34 -07:00
Elliott Hughes
8f3f191bf3 Link our two main developer-facing docs together.
Bug: http://b/139329827
Test: N/A
Change-Id: I38e05f1a7eaa8ff31b503541e34f2e362cd4722e
2019-08-15 08:19:49 -07:00
Christopher Ferris
9a2cc418cd Merge "Update location of trace files."
am: 1491521a68

Change-Id: Ib7e001a0401322645d5e505bd7ca9a8a7e58feb5
2019-08-15 07:41:25 -07:00
Christopher Ferris
1491521a68 Merge "Update location of trace files." 2019-08-15 14:17:49 +00:00
Peter Collingbourne
d42a1d1eaa Merge "Fix OOB read in fortify str[np]cpy implementations found by hwasan."
am: 2fbbc253f6

Change-Id: Ie296d45cebb5c7be5a8a22e7168c1e4f361c1b97
2019-08-14 22:44:38 -07:00
Treehugger Robot
2fbbc253f6 Merge "Fix OOB read in fortify str[np]cpy implementations found by hwasan." 2019-08-15 05:26:43 +00:00
Vic Yang
25b6ea7e25 Merge "linker: Set VMA name for bss sections"
am: a40a1442a8

Change-Id: I0f4c3458f6e8d76311b3e691581755191011822b
2019-08-14 18:04:40 -07:00
Treehugger Robot
a40a1442a8 Merge "linker: Set VMA name for bss sections" 2019-08-15 00:50:49 +00:00
Christopher Ferris
aa22c0cb0c Update location of trace files.
Test: NA
Change-Id: I27f98b84b7701b8747d22dbdfbfa074083c36bc1
2019-08-14 15:17:26 -07:00
Vic Yang
1bf62b24ab linker: Set VMA name for bss sections
The linker currently sets VMA name ".bss" for bss sections in DSOs
loaded by the linker.  With this change, the linker now also sets VMA
name for bss sections in the linker itself and the main executable, so
that they don't get left out in various accounting.

Test: Run 'dd' and check its /proc/<pid>/maps.
Change-Id: I62d9996ab256f46e2d82cac581c17fa94836a228
2019-08-14 13:52:48 -07:00
Xin Li
9ae510c09b DO NOT MERGE - Skip qt-dev-plus-aosp-without-vendor (5713463) in stage-aosp-master
Bug: 134405016
Change-Id: I5835c5202ea1793c7f31792a75919408b2fbcfe2
2019-08-14 11:35:07 -07:00
Kiyoung Kim
7660ec25aa Merge "Use generated linker config"
am: 6b0d1cd3ac

Change-Id: If716bee32b1d9ee244e190bc540e4689f57d0340
2019-08-14 02:47:14 -07:00
Kiyoung Kim
6b0d1cd3ac Merge "Use generated linker config" 2019-08-14 09:28:23 +00:00
Tom Cherry
32b5f4e16b stdatomic_test: always use bits/stdatomic.h
Host includes are updated now, so we always must include
bits/stdatomic.h

Bug: 137876753
Bug: 138701943
Test: not yet
Change-Id: Ib2ce34ae5dace8f9a114fa8c04f864cd7f41a5d9
2019-08-14 07:08:28 +00:00
Josh Gao
6f844f936f Merge "leak_test: use tgkill to check if threads are alive."
am: 80d85f72dd

Change-Id: I2cb534827a3afa286305d093d498a497c688a3c0
2019-08-13 18:48:23 -07:00
Jiyong Park
bba48e1671 Merge "Don't create anonymous namespace"
am: d82eb35c76

Change-Id: Id231ccaf509cfb56d1265fba32b117d0430d18c5
2019-08-13 18:41:34 -07:00
Josh Gao
80d85f72dd Merge "leak_test: use tgkill to check if threads are alive." 2019-08-14 01:30:51 +00:00
Jiyong Park
d82eb35c76 Merge "Don't create anonymous namespace" 2019-08-14 01:21:30 +00:00
Josh Gao
253ef12f50 leak_test: use tgkill to check if threads are alive.
If one of our threads exits and a new process shows up with the same
tid, we would previously loop until that process exits, leading to
flakiness in tests.

Also fix use of uninitialized memory that happens when threads_count !=
kThreadCount.

Bug: http://b/139315254
Test: /data/nativetest/bionic-unit-tests/bionic-unit-tests --gtest_filter="pthread_leak.detach" on cuttlefish
Change-Id: I2aad7f3f105aeba87c3929bfce53ef08e1484b2d
2019-08-13 16:13:39 -07:00
Tom Cherry
77da70ef5b Merge "Fix timespec.h documentation"
am: 6864fc8d06

Change-Id: I8761ad4678ba7d59c0f5500d50ded116c30cd1ff
2019-08-13 09:25:14 -07:00
Tom Cherry
6864fc8d06 Merge "Fix timespec.h documentation" 2019-08-13 15:56:06 +00:00
Tom Cherry
a960142fe3 Fix timespec.h documentation
There are 1,000,000,000 nanoseconds in a second.

Test: n/a
Change-Id: I8ce622ce3c60d7d5b06a056cfd0e6bea976b5aab
2019-08-12 13:34:03 -07:00
Pete Gillin
993434994e Merge "Revert "fdsan: make fatal by default.""
am: c6c17ac1e8

Change-Id: I8f5bc30ea2077318e1196cef81bff85bd42a06a2
2019-08-09 04:50:03 -07:00
Pete Gillin
c6c17ac1e8 Merge "Revert "fdsan: make fatal by default."" 2019-08-09 11:29:36 +00:00
Pete Gillin
76351e3e3f Revert "fdsan: make fatal by default."
This reverts commit 66b5e3ca19.

Reason for revert: Causes installd_dexopt_test to fail. Presumably there is an existing issue which this change is turning into a hard fail, so that needs to be fixed before this can be rolled forwards. See b/139092341.

Bug: 139092341
Bug: 137788030
Change-Id: I1beccddff64c86541bc003b9b009f4046ec9cbf1
2019-08-09 11:18:39 +00:00
Peter Collingbourne
a51bded572 Fix OOB read in fortify str[np]cpy implementations found by hwasan.
The fortify implementations of stpncpy and strncpy read out of bounds and
only then check that they did so. This causes newer versions of hwasan
to complain during the fortify tests as a result of the new support for
byte-precise error checks. Move the bounds check into the loop so that it
is detected before the load.

Test: bionic-unit-tests
Change-Id: Id990a4a0217f6c4b39bba60ff41776875615fcb4
2019-08-08 18:54:31 -07:00
Roland Levillain
10541de1fa Merge "Fix some typos in the linker configuration file format documentation."
am: 639ad55176

Change-Id: I0f694b4dd0d39bf96d0c45e691aa2bab6d2a4170
2019-08-08 06:21:39 -07:00
Roland Levillain
639ad55176 Merge "Fix some typos in the linker configuration file format documentation." 2019-08-08 12:55:57 +00:00
Jiyong Park
25bedfd3dd Don't create anonymous namespace
Anonymous namespace is not created separately. When a regular namespace
is created with ANDROID_NAMESPACE_TYPE_ALSO_USED_AS_ANONYMOUS, that
namespace is used as the anonymous namespace.

Bug: 130388701
Test: CtsBionicTestCases
Change-Id: Ie449a59f303487a7a9ff6fff98e6148e9f968fd2
2019-08-08 16:02:15 +09:00
Christopher Ferris
ccb53ac3b8 Merge "Change all references to PSS to RSS."
am: 89a1407255

Change-Id: Ibba53d2d48fdb83d02408a38e21a52935aa1ff30
2019-08-07 21:40:51 -07:00
Christopher Ferris
89a1407255 Merge "Change all references to PSS to RSS." 2019-08-08 04:14:15 +00:00
Tom Cherry
37ba89a702 Merge "Remove now unneeded #undef in __cxa_guard.cpp"
am: 5dea560e4c

Change-Id: Ibcf3c75a084435c05739a2720842961b8094fc85
2019-08-07 16:29:29 -07:00
Tom Cherry
5dea560e4c Merge "Remove now unneeded #undef in __cxa_guard.cpp" 2019-08-07 23:04:50 +00:00
Christopher Ferris
05197f7d03 Change all references to PSS to RSS.
RSS is the real measurement by which an allocator should be measured
since RSS is the real memory consumed by the process. PSS is a shared
value.

For memory_replay, PSS and RSS should be the same, so this didn't really
matter in practice, but it's better to use the correct name of RSS.

Also, add a small section about fragmentation.

Bug: 138394907

Test: NA
Change-Id: Ic6f982f9c4619f452342e7c105818e33b8b85e44
2019-08-07 15:34:11 -07:00
Josh Gao
db7f956bca Merge "fdsan: make fatal by default."
am: 592b5f52fd

Change-Id: I65cfaaee6c892033778255c02e50c0717db751d3
2019-08-07 13:28:50 -07:00
Josh Gao
592b5f52fd Merge "fdsan: make fatal by default." 2019-08-07 19:53:40 +00:00