Commit graph

27325 commits

Author SHA1 Message Date
Chih-hung Hsieh
fe108db540 Merge "Add noexcept to move constructors and assignment operators." 2018-09-25 23:15:54 +00:00
Elliott Hughes
edf8f1a4f1 Merge "Only use NDK libraries in the benchmarks."
am: efaa60ff6c

Change-Id: Ib1c8f6b47192686b5bac7c9c14a673acce9a306f
2018-09-25 15:30:53 -07:00
Elliott Hughes
efaa60ff6c Merge "Only use NDK libraries in the benchmarks." 2018-09-25 22:13:09 +00:00
Chih-Hung Hsieh
9a64b56334 Add noexcept to move constructors and assignment operators.
Bug: 116614593
Test: build with WITH_TIDY=1
Change-Id: I9f8760cddb3c25255cd24604606af84d837d55e9
2018-09-25 14:00:44 -07:00
dimitry
b8b3a76606 linker: extract defaults and source files
Move source files to filegroup and extract c/ldflags and
version-script to linker_defaults.

Bug: http://b/71494052
Test: make
Change-Id: Ic82885e1c006f91a8446978fabd214f87cd20510
2018-09-25 16:17:24 +02:00
dimitry
21557cdd2e Ignore output to stderr while enumerating tests
Bug: http://b/114304197
Test: adb unroot && run CtsBionicTestCases
Change-Id: I75880934fa1c25be6c76e866f97efc14d5ccd0a1
2018-09-25 12:23:33 +02:00
Stephen Hines
cd659d410a Fix up a few bionic tests for the clang-r339409 update.
Disable -Wmemset-transposed-args to ensure that FORTIFY still works
without it. Also, we can finally enable checking for
FLT_HAS_SUBNORM/DBL_HAS_SUBNORM/LDBL_HAS_SUBNORM now that those are
available in Clang.

Bug: http://b/110779387
Test: build and run bionic unit tests
Change-Id: I4bf19b870c44d981ecbd1089d0ae6a2496be5441
2018-09-24 16:59:08 -07:00
Elliott Hughes
627329915a Only use NDK libraries in the benchmarks.
It should be possible to run the benchmarks on any device, including
past and future ones, and sticking to NDK libraries ensures that.

Bug: N/A
Test: `readelf -aW`
Change-Id: I15a7a4104fa30263136bc3033d2bd9022cd8ff7b
2018-09-24 16:45:13 -07:00
Christopher Ferris
757ce0c2d7 Merge "Touch the memory when doing malloc/free benchmark."
am: 30b17e32f0

Change-Id: I535050f02d8d93e3e4c85349e3f1804cee0b40b7
2018-09-21 09:12:01 -07:00
Christopher Ferris
30b17e32f0 Merge "Touch the memory when doing malloc/free benchmark." 2018-09-21 15:51:08 +00:00
Elliott Hughes
d0cceb0499 Merge "Remove unused NetBSD compatibility cruft."
am: 8f5589faf2

Change-Id: Ic10b6409b8081dfee4138188d35e085d2c437381
2018-09-20 18:21:37 -07:00
Evgenii Stepanov
f59d04a759 Merge "[hwasan] Tweak process and thread initialization."
am: 8d11bea6c5

Change-Id: If751f9b66bacd80f21cbc9f693fb11d29680e961
2018-09-20 18:15:13 -07:00
Treehugger Robot
8f5589faf2 Merge "Remove unused NetBSD compatibility cruft." 2018-09-21 01:06:32 +00:00
Josh Gao
fbec1c0ced Merge changes from topics "fdsan_ziparchive_type", "fdsan_java_socket"
am: ce9d653b38

Change-Id: Ia9f5e9a20d471712e5fa8259c1c5d0fbf6b9a85b
2018-09-20 18:03:57 -07:00
Christopher Ferris
4fae703029 Touch the memory when doing malloc/free benchmark.
Also, update the benchmark loop for modern C++.

Test: Ran benchmarks.
Change-Id: I925446b893793eb8c2c6759716cdd3dbbcf1e7c1
2018-09-20 15:03:49 -07:00
Evgenii Stepanov
8d11bea6c5 Merge "[hwasan] Tweak process and thread initialization." 2018-09-20 21:39:55 +00:00
Elliott Hughes
64f8e7b1cc Remove unused NetBSD compatibility cruft.
Bug: N/A
Test: builds
Change-Id: I5c472c7b5c570c739363b4a454251ebf0324d43c
2018-09-20 13:27:41 -07:00
Josh Gao
ce9d653b38 Merge changes from topics "fdsan_ziparchive_type", "fdsan_java_socket"
* changes:
  fdsan: improve documentation.
  fdsan: add type for libziparchive's ZipArchive.
  fdsan: add types for Java sockets.
2018-09-20 19:22:03 +00:00
Evgenii Stepanov
13e8dcbdc9 [hwasan] Tweak process and thread initialization.
Make sure that TLS_SLOT_TSAN is always available and correctly set up in
HWASan-instrumented functions by setting up the tls register and running hwasan
initialization (__hwasan_init in the main thread and __hwasan_thread_enter in
secondary) early enough.

This is needed to accomodate a change in HWASan: https://reviews.llvm.org/D52249

Bug: 112438058
Test: boot with SANITIZE_TARGET=hwaddress, run bionic-tests
Change-Id: Icd909a4ea0da6c6c1095522bcc28debef5f2c63d
2018-09-20 12:20:12 -07:00
Elliott Hughes
99530a9049 Merge "Remove dead code."
am: a02d631163

Change-Id: I747454d10a4745c82a281fe2c362ab3a2d9c86dd
2018-09-19 10:22:15 -07:00
Elliott Hughes
a02d631163 Merge "Remove dead code." 2018-09-19 17:13:11 +00:00
Elliott Hughes
15711c1dd0 Remove dead code.
I stumbled across this because I was looking at the various locks in libc.

Bug: N/A
Test: ran tests
Change-Id: I77c9954f49aaae7519ea7f4917bbe6f138b841ad
2018-09-18 14:28:48 -07:00
Josh Gao
d747bb8f3f fdsan: improve documentation.
Fix a race condition in the example, and add a linearized version to
make it more clear what's going on.

Test: none
Change-Id: Id9158e4fd407b676ef364e7076985de3ad477457
2018-09-18 13:42:08 -07:00
Josh Gao
5fa9df8efc fdsan: add type for libziparchive's ZipArchive.
Test: debuggerd `pidof system_server` | grep " fd "
Change-Id: I6a9a4306ecffe3899e4cc7285a0eb33efaa62616
2018-09-18 13:23:31 -07:00
Elliott Hughes
4c23b05a63 Merge "State clearly that an ELF file has the wrong architecture."
am: 655f80e37f

Change-Id: I8a8eb83f3cf56d2177d12d49e2fb8991065b1524
2018-09-18 11:23:01 -07:00
Elliott Hughes
655f80e37f Merge "State clearly that an ELF file has the wrong architecture." 2018-09-18 18:15:07 +00:00
Josh Gao
d527cf1f99 fdsan: add types for Java sockets.
Test: art/tools/run-libcore-tests.sh
Change-Id: If61211bc4ae225c3f89db989a167f9dc4fce375a
2018-09-17 17:31:58 -07:00
Elliott Hughes
d16cface55 State clearly that an ELF file has the wrong architecture.
Before:

  "libx.so" has unexpected e_machine: 40 (EM_ARM)

After:

  "libx.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)

Bug: N/A
Test: `LD_PRELOAD=/system/lib64/libm-x86_64.so date` on arm64
Change-Id: I5bb40c435bd22b4e11fe802615925e10db7fb631
2018-09-17 15:50:09 -07:00
Elliott Hughes
a045992eda Merge "Explicitly say pthread_cancel in the docs."
am: 8b527f2857

Change-Id: I2c829c4596f0c4a27a6efc18ce03ccaf64ccf483
2018-09-15 08:50:24 -07:00
Elliott Hughes
8b527f2857 Merge "Explicitly say pthread_cancel in the docs." 2018-09-15 15:40:03 +00:00
Elliott Hughes
670ea7aca9 Explicitly say pthread_cancel in the docs.
Bug: http://b/33943372
Test: N/A
Change-Id: If71691f7ff20c9b8c14de15692543bbd858c9aab
2018-09-14 17:05:01 -07:00
Peter Collingbourne
c61ae56495 Merge "benchmarks: Fix the benchmark tests."
am: ed16b344e7

Change-Id: Ic3da18c7bc6d7d5f72b89360a6cf546070f04d71
2018-09-13 19:25:46 -07:00
Peter Collingbourne
ed16b344e7 Merge "benchmarks: Fix the benchmark tests." 2018-09-14 02:16:52 +00:00
Peter Collingbourne
9dda60d43b Merge "benchmarks: Update the documentation."
am: b228f4e3d3

Change-Id: I79e4d719bcc3eba24b26689ac47e97b4278209c8
2018-09-13 16:24:45 -07:00
Peter Collingbourne
b228f4e3d3 Merge "benchmarks: Update the documentation." 2018-09-13 23:12:08 +00:00
Peter Collingbourne
62011c27a7 benchmarks: Update the documentation.
Update the locations of the benchmark binaries to match where they
are currently installed.
2018-09-13 16:08:18 -07:00
Peter Collingbourne
c282ca9f44 benchmarks: Fix the benchmark tests.
Update the list of benchmarks to include the recently added strncmp
benchmarks.
2018-09-13 16:06:01 -07:00
Robert Sesek
9e3e6085a9 Merge "Move pipe, open, and getdents from the APP to COMMON seccomp whitelist."
am: 4d98149096

Change-Id: Ia8b2438f7e7f4518cf5cf190367cb30d490527c1
2018-09-12 15:44:38 -07:00
Treehugger Robot
4d98149096 Merge "Move pipe, open, and getdents from the APP to COMMON seccomp whitelist." 2018-09-12 21:46:14 +00:00
Robert Sesek
74cdb253ba Move pipe, open, and getdents from the APP to COMMON seccomp whitelist.
These system calls are required by Breakpad for crash reporting.
WebViews are spawned from the webview_zygote, which itself is spawned
from the app_process zygote. The webview_zygote gets the SYSTEM seccomp
policy applied because it is not an app, and so the WebView sandboxed
processes inherit that policy.

In Ifd8a85b0de2eb6f2a76a6458570fc03b020a90ab, these system calls were
moved from COMMON to APP, which breaks Breakpad/crash reporting for
WebView sandboxed processes.

Bug: 112572914
Test: `am start com.android.settings/.SettingsLicenseActivity`
Test: Get the pid of the sandboxed_process0 for the license viewer.
Test: Send the process SIGABRT and check logcat for "google-breakpad"
      error messages.

Change-Id: I1cf56ae85b1a67ec91e979bc7e0f941726a9cc0e
2018-09-11 19:20:34 -04:00
Orion Hodson
1a9b28842c Merge "Update probing in membarrier_test"
am: 56deeb7336

Change-Id: I9482ccd337aba002db4edb53701d7f09062a88d4
2018-09-10 23:55:51 -07:00
Orion Hodson
56deeb7336 Merge "Update probing in membarrier_test" 2018-09-11 06:43:10 +00:00
Orion Hodson
0c938550cf Update probing in membarrier_test
Updates HasMembarrier(cmd) to probe rather than execute command to fix
unintended test skipping.

Test: manual on OrangePi Zero running 4.17.4.
Change-Id: I33a6684a3662cae20cbedc52463b26ef299caf71
2018-09-10 10:21:40 +01:00
Christopher Ferris
66584fef49 Merge "Fix membarrier test."
am: 2942b6a2c2

Change-Id: I7e2381d2d4a03a09c693d4b80348692f31311b0f
2018-09-08 09:48:58 -07:00
Christopher Ferris
2942b6a2c2 Merge "Fix membarrier test." 2018-09-08 16:33:47 +00:00
Bernie Innocenti
1de7afafb6 Merge "Improve netd detection"
am: 59c08dd67b

Change-Id: I2ae5860f184e2236cbf25b92f6e6f3bef3d8a024
2018-09-07 19:15:12 -07:00
Bernie Innocenti
59c08dd67b Merge "Improve netd detection" 2018-09-08 01:58:34 +00:00
Christopher Ferris
795034cab8 Fix membarrier test.
Some older kernels do not support all membarrier commands. For example,
the 4.9.x kernel only supports MEMBARRIER_CMD_QUERY and MEMBARRIER_CMD_SHARED.

Test: Ran unit tests on hikey.
Change-Id: I5d4b93df6aa5f443c4700e8f7d33f46953f74e87
2018-09-07 14:11:28 -07:00
Bernie Innocenti
fb4eaa019e Improve netd detection
The alleged improvement consists in making the detection actually work
when netd is spawned by init, which of course uses the full path.
I had tested the previous logic by running netd from the shell, which
worked because argv[0] was just set to "netd". My bad -_-

Test: flash, boot and grep logcat for "Skipping libnetd_client init"
Change-Id: Ie5f11436dfa2a9347721147dc2b980144452404a
2018-09-07 10:29:18 -07:00
Elliott Hughes
4743e2f3a0 Merge "Add android_get_device_api_level."
am: 431d2ff141

Change-Id: I9c6a8bd66e2cec78fa62613c3d591e52e29e933e
2018-09-07 08:49:49 -07:00