Commit graph

30141 commits

Author SHA1 Message Date
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
47498e16f9 Merge "leak_test: use tgkill to check if threads are alive." am: 80d85f72dd am: 6f844f936f
am: 1dbc20905a

Change-Id: Ia0c5cb6b90d0f61c8d1099c0bec8a28efed5bd00
2019-08-13 19:12:49 -07:00
Jiyong Park
fb6b2a9cf3 Merge "Don't create anonymous namespace" am: d82eb35c76 am: bba48e1671
am: 359f39d2a1

Change-Id: I35f2b6b7a167f8ad5bd939c4ccc4044604ad40fb
2019-08-13 19:05:47 -07:00
Josh Gao
1dbc20905a Merge "leak_test: use tgkill to check if threads are alive." am: 80d85f72dd
am: 6f844f936f

Change-Id: I2bad3d4a8fb251da87ee1d7a54c914244369dded
2019-08-13 19:00:41 -07:00
Jiyong Park
359f39d2a1 Merge "Don't create anonymous namespace" am: d82eb35c76
am: bba48e1671

Change-Id: I1cac59d7ec4b99b6b663f05d01195851c4497893
2019-08-13 18:53:13 -07: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
9dd7994e12 Merge "Fix timespec.h documentation" am: 6864fc8d06 am: 77da70ef5b
am: a8c6b0229e

Change-Id: Iab0470c4d109280c8f4cafd0ca07d933fe55dc1c
2019-08-13 09:37:19 -07:00
Tom Cherry
a8c6b0229e Merge "Fix timespec.h documentation" am: 6864fc8d06
am: 77da70ef5b

Change-Id: I165bbf8198891b6a883a98ec90e7c05d5b429732
2019-08-13 09:31:12 -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
80c6f5f3e8 Merge "Revert "fdsan: make fatal by default."" am: c6c17ac1e8 am: 993434994e
am: 0d7bf5e342

Change-Id: I688555c68e77a38eda970084e889bae5042592ab
2019-08-09 05:10:14 -07:00
Pete Gillin
0d7bf5e342 Merge "Revert "fdsan: make fatal by default."" am: c6c17ac1e8
am: 993434994e

Change-Id: I88fbcf48fce8b48ebcd9e471a587c46a29900d0a
2019-08-09 04:59:25 -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
46c3ab5c4f Merge "Fix some typos in the linker configuration file format documentation." am: 639ad55176 am: 10541de1fa
am: 6eeb3bc7d2

Change-Id: Ib8fce7707b46d85ad4fe5da340966c60906455b0
2019-08-08 06:43:28 -07:00
Roland Levillain
6eeb3bc7d2 Merge "Fix some typos in the linker configuration file format documentation." am: 639ad55176
am: 10541de1fa

Change-Id: I44dd0456f8dc1886bb994425e12275f4b6edd6d7
2019-08-08 06:33:17 -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
7c82607bb7 Merge "Change all references to PSS to RSS." am: 89a1407255 am: ccb53ac3b8
am: 05434ed5b8

Change-Id: I52f1ea96eaf7df147ee153dfd514ffd0dd1a5785
2019-08-07 22:03:32 -07:00
Christopher Ferris
05434ed5b8 Merge "Change all references to PSS to RSS." am: 89a1407255
am: ccb53ac3b8

Change-Id: Ib96140d8bd32de50fd07174a418b40ada29e6546
2019-08-07 21:51:17 -07: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
3167239718 Merge "Remove now unneeded #undef in __cxa_guard.cpp" am: 5dea560e4c am: 37ba89a702
am: c0aeab3459

Change-Id: I258964b70746c0134da4f6eb5032d5559862c072
2019-08-07 16:50:35 -07:00
Tom Cherry
c0aeab3459 Merge "Remove now unneeded #undef in __cxa_guard.cpp" am: 5dea560e4c
am: 37ba89a702

Change-Id: Ia82f762aa3fdb827110618cf1f2935e0b9f6b660
2019-08-07 16:39:31 -07: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
0e5e19f4ee Merge "fdsan: make fatal by default." am: 592b5f52fd am: db7f956bca
am: 52d17b9433

Change-Id: I300ef4788a618637ebc357620c63b31ae593fae0
2019-08-07 13:52:38 -07:00
Josh Gao
52d17b9433 Merge "fdsan: make fatal by default." am: 592b5f52fd
am: db7f956bca

Change-Id: I3d4204fb95414434616fe9923454d74494f9129c
2019-08-07 13:40:51 -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
Josh Gao
66b5e3ca19 fdsan: make fatal by default.
Make fdsan fatal by default on native processes, and Java processes that
target R or later.

Bug: http://b/137788030
Test: manual
Change-Id: I5900efc606fc0d47b69223574ad7dca89afe4eda
2019-08-07 19:53:14 +00:00
Tom Cherry
08baac348c Remove now unneeded #undef in __cxa_guard.cpp
Before aosp/1086558, this was needed, since we would have
_USING_LIBCXX defined, yet <atomic> was not available, so we'd run
into compiler issues.  After that change, we're using
__has_include(<atomic>) so this is no longer an issue.

Test: build
Change-Id: Ia81d343000e7d90f07422120fc1e1eb5becb01aa
2019-08-07 11:10:22 -07:00
Roland Levillain
bd6ccf91fb Fix some typos in the linker configuration file format documentation.
Test: n/a
Change-Id: I17d9f5aaf066d335fd5ba1af77a829d20de2bfd7
2019-08-07 18:45:45 +01:00
Kiyoung Kim
35e3b4b013 Use generated linker config
Linker config now generates ld.config.txt under /dev/linkerconfig from
init. To use this, this change updates linker to pick up
/dev/linkerconfig/ld.config.txt if system property
(sys.linker.use_generated_config) is true.

Bug: 138920271
Test: m -j && tested from cuttlefish
Change-Id: I0f527741ace2d512b45fd72c301aa4cfcfe17a71
2019-08-07 19:24:13 +09:00
Tom Cherry
67612d45a3 Merge "linker: Remove setting _USING_LIBCXX" am: a08626af27 am: f2b0491545
am: a126ec3e30

Change-Id: Id65fe3e0d045e579eb5eb66769b325b95c538fb6
2019-08-06 17:36:36 -07:00
Tom Cherry
a126ec3e30 Merge "linker: Remove setting _USING_LIBCXX" am: a08626af27
am: f2b0491545

Change-Id: I58cbdc4dd29fadfe2008044d8f86f2c139c7f745
2019-08-06 17:25:37 -07:00
Tom Cherry
f2b0491545 Merge "linker: Remove setting _USING_LIBCXX"
am: a08626af27

Change-Id: I0bfe6fd5aa5ea42de116e145e48a3c960e53be78
2019-08-06 17:12:28 -07:00
Tom Cherry
a08626af27 Merge "linker: Remove setting _USING_LIBCXX" 2019-08-06 23:14:35 +00:00
Elliott Hughes
bc63a290e9 Merge "Add memfd_create(2) and mlock2(2)." am: da32ff104b am: 15ae87b2fb
am: 93d964e028

Change-Id: I9d70543b44eaf678334d919bcdf286481e3f4da7
2019-08-06 10:54:02 -07:00
Elliott Hughes
93d964e028 Merge "Add memfd_create(2) and mlock2(2)." am: da32ff104b
am: 15ae87b2fb

Change-Id: I45dd8b417f21a0c553ac4acb9a9d6eb19acc7198
2019-08-06 10:48:03 -07:00
Elliott Hughes
15ae87b2fb Merge "Add memfd_create(2) and mlock2(2)."
am: da32ff104b

Change-Id: I2609877a7984e137a785614b6eff01d728472b76
2019-08-06 10:40:22 -07:00