Commit graph

31436 commits

Author SHA1 Message Date
Automerger Merge Worker
d7fbd3cc8b Merge "[GWP-ASan] Intercept calloc() again." am: d92b03887d am: cb7f2a7905
Change-Id: Idb53400dcb0c4403504690bc54b1382853b26465
2020-03-16 20:55:54 +00:00
Automerger Merge Worker
cb7f2a7905 Merge "[GWP-ASan] Intercept calloc() again." am: d92b03887d
Change-Id: I96670156a22bfc3a673eb045266f975e3fc9d191
2020-03-16 20:42:28 +00:00
Mitch Phillips
d92b03887d Merge "[GWP-ASan] Intercept calloc() again." 2020-03-16 20:18:04 +00:00
Mitch Phillips
32abb0b81e [GWP-ASan] Intercept calloc() again.
Bug: 150456936
Test: N/A

Change-Id: Id273e1811f9919c8bdbdbf0ad850421e7c1cd8da
2020-03-16 20:17:39 +00:00
Automerger Merge Worker
b2d0975de0 Merge "Disable branch protection for arm64." am: 69046e0842 am: e217675532
Change-Id: I6da15a43f73a0a6da75c7ab1c82d047d05b33e0c
2020-03-13 16:41:34 +00:00
Automerger Merge Worker
e217675532 Merge "Disable branch protection for arm64." am: 69046e0842
Change-Id: I71ddd234c23b738081f1c71bbab59896a9e61e1d
2020-03-13 16:28:04 +00:00
Christopher Ferris
69046e0842 Merge "Disable branch protection for arm64." 2020-03-13 16:19:19 +00:00
Christopher Ferris
140220bd23 Disable branch protection for arm64.
This causes failures in signal handler tests, because it looks like clang
doesn't understand how to enable the stack protection in a signal handler.
Clang winds up scribbling on the real stack.

Bug: 149934069
Bug: 151372823

Test: Ran all unit tests on bonito/taimen and the signal handler tests pass.
Change-Id: If73f55e7505b6d7f35b340be0b03c798b21e2829
2020-03-13 00:18:42 +00:00
Automerger Merge Worker
3d9cfceef5 Merge "Add explicit state for heapprofd hooking." am: c84d295f7c am: 266ced879f
Change-Id: Ib1d3baf27e8817f412ea71b5ebb0b5679985a870
2020-03-12 18:09:51 +00:00
Automerger Merge Worker
266ced879f Merge "Add explicit state for heapprofd hooking." am: c84d295f7c
Change-Id: I3350d2d409eb3c04a7bca4e2cc6996c57b67e4f3
2020-03-12 17:53:25 +00:00
Florian Mayer
c84d295f7c Merge "Add explicit state for heapprofd hooking." 2020-03-12 17:12:17 +00:00
Florian Mayer
fdd5eb1977 Add explicit state for heapprofd hooking.
The double hooking is currently controlled by two separate atomic
booleans. In this state, it is very hard to guard against very subtle
race conditions. Adding an explicit enum to encode the state makes it
easier to reason about the behaviour of the program.

Also introduce a MaybeModifyGlobals to consistently guard accesses to
globals. We would sometimes modify them without swapping the
gGlobalsMutating, introducing a window for race with
HandleHeapprofdSignal.

Test: while true; do atest HeapprofdCtsTest; done
Test: flash blueline and manually test profile
Bug: 150741354
Change-Id: I77102b0bd906b8ec2d6806bd43ba6cbf7191e37c
2020-03-11 10:21:27 -07:00
Automerger Merge Worker
999e079b4f Merge "Statically link libdl.a to linker" am: bd6a5570bb am: cfe2618deb
Change-Id: Iff0092fd080ff506a773439338f05249bab91306
2020-03-11 08:34:54 +00:00
Automerger Merge Worker
cfe2618deb Merge "Statically link libdl.a to linker" am: bd6a5570bb
Change-Id: I1e019e63b7e3f4c994be03441fa86203846a43eb
2020-03-11 08:16:45 +00:00
Jiyong Park
bd6a5570bb Merge "Statically link libdl.a to linker" 2020-03-11 07:55:32 +00:00
Jiyong Park
8dba7fefb0 Statically link libdl.a to linker
When libbase is built for an APEX, it uses dlsym to reflectively access
liblog symbols that are added in R. This is because the APEX where
libbasse is packaged into might be running in pre-R devices where the
symbols don't exist in liblog.so.

This however causes a problem for a static executable in an APEX. Since
it is in an APEX, the dlsym is used. But libdl.so which provides dlsym
is not available to static executable. Currently, the dynamic linker is
the only executable in an APEX that all of its dependencies are
statically linked. Fixing the issue by providing fake dlsym by
statically linking to libdl.a.

Exempt-From-Owner-Approval: cherry-pick rvc-dev

Bug: 149569129
Test: m

Merged-In: I2e9e45d9876c2d6c878e541715389e6d1ef56996
(cherry picked from commit ec829ed4ea)
Change-Id: I2e9e45d9876c2d6c878e541715389e6d1ef56996
2020-03-11 07:53:47 +00:00
Automerger Merge Worker
fffc5e85a4 Merge "Delete definitions of __aeabi_unwind_cpp_pr0." am: ae35f675bb am: 17c5f4648b
Change-Id: I9895b18a5fbf0568a6553104cb735c6fb68d3b61
2020-03-10 21:24:33 +00:00
Automerger Merge Worker
17c5f4648b Merge "Delete definitions of __aeabi_unwind_cpp_pr0." am: ae35f675bb
Change-Id: I8a20df781cae7206d96528ff2333bb0cb02de8d1
2020-03-10 21:02:08 +00:00
Treehugger Robot
ae35f675bb Merge "Delete definitions of __aeabi_unwind_cpp_pr0." 2020-03-10 18:30:30 +00:00
Automerger Merge Worker
15a231d6db Merge "Rewrite __cxa_atexit / __cxa_finalize" am: 7aa6ba4aec am: 7673fbe42a
Change-Id: I3c61f50ad1971c3fda7cd5366727a1d5c62443bb
2020-03-09 21:42:30 +00:00
Automerger Merge Worker
7673fbe42a Merge "Rewrite __cxa_atexit / __cxa_finalize" am: 7aa6ba4aec
Change-Id: I4f1be7f99765a0bab15045992c1afe0874daaefc
2020-03-09 21:18:07 +00:00
Ryan Prichard
7aa6ba4aec Merge "Rewrite __cxa_atexit / __cxa_finalize" 2020-03-09 21:00:58 +00:00
Automerger Merge Worker
1266c1cd97 Merge "Add 29 to stubs.versions of libc/libdl/libm" am: 7d97c36b3f am: 4a2cd87706
Change-Id: Ic94b846e783fb74b145c46bc958ba8fee82aba8e
2020-03-07 09:11:25 +00:00
Automerger Merge Worker
4a2cd87706 Merge "Add 29 to stubs.versions of libc/libdl/libm" am: 7d97c36b3f
Change-Id: Ia133811bca9cc0e6f1bdeca2a7aaa2f9a240643d
2020-03-07 08:59:17 +00:00
Treehugger Robot
7d97c36b3f Merge "Add 29 to stubs.versions of libc/libdl/libm" 2020-03-07 08:44:32 +00:00
Ryan Prichard
afa983c8d4 Rewrite __cxa_atexit / __cxa_finalize
Simplify:
 - Use a single memory-mapped region to hold the table of destructors.
   Double its capacity each time it is expanded.
 - Add a recompaction pass at the end of __cxa_finalize that shifts
   entries forward and uses madvise to clean pages.

Bug: http://b/148055738
Test: bionic-unit-tests
Change-Id: Ieb9da2b88640a8a5277d217b43826b5b7e246781
2020-03-06 21:04:32 -08:00
Automerger Merge Worker
67935b636a Merge "Merge stage-aosp-master to aosp-master - DO NOT MERGE" am: 1a1888f801 am: e0d92ea3a6
Change-Id: I136fce1e3a627283761a0e23be07ad1d225acc4e
2020-03-06 00:27:40 +00:00
Automerger Merge Worker
2da2daf754 Merge stage-aosp-master to aosp-master - DO NOT MERGE am: 3fc9c80e91 am: a90aa4689d
Change-Id: I2dd37aa95483350f7656473ebe3aa60d0dfe1ae0
2020-03-06 00:26:59 +00:00
Automerger Merge Worker
e0d92ea3a6 Merge "Merge stage-aosp-master to aosp-master - DO NOT MERGE" am: 1a1888f801
Change-Id: If3d0e3d6873e75973d84301f13b28e2724be73a4
2020-03-06 00:13:06 +00:00
Automerger Merge Worker
a90aa4689d Merge stage-aosp-master to aosp-master - DO NOT MERGE am: 3fc9c80e91
Change-Id: I1c6e6881623b1a7f5586e2555af2a7a879ab5e6a
2020-03-06 00:12:24 +00:00
Bill Yi
1a1888f801 Merge "Merge stage-aosp-master to aosp-master - DO NOT MERGE" 2020-03-05 18:27:31 +00:00
Bill Yi
3fc9c80e91 Merge stage-aosp-master to aosp-master - DO NOT MERGE
Change-Id: I402904753a20804e8709e8873e1a8962bb2d8056
2020-03-05 09:50:54 -08:00
Automerger Merge Worker
cb987ca809 Merge "Fix bugprone-macro-parentheses warnings" am: 608c74aecf am: 138897d14a
Change-Id: I847471cfc805bbb75873e77869e5af1829347c7e
2020-03-05 05:58:39 +00:00
Automerger Merge Worker
138897d14a Merge "Fix bugprone-macro-parentheses warnings" am: 608c74aecf
Change-Id: Ie9fee69253e70ad129eadd2d8d78d8beb1498918
2020-03-05 05:40:25 +00:00
Chih-hung Hsieh
608c74aecf Merge "Fix bugprone-macro-parentheses warnings" 2020-03-05 05:18:32 +00:00
Chih-Hung Hsieh
fa658eb094 Fix bugprone-macro-parentheses warnings
Bug: 150783705
Test: WITH_TIDY=1 make
Change-Id: If47b7adaa5f3ba3c518fb0be48f0ffdc81d204b2
2020-03-04 13:22:05 -08:00
Automerger Merge Worker
9db04f074d Merge "Remove return after GTEST_SKIP." am: b274746dd3 am: ada3844361
Change-Id: I3ddca45ae544c345050038697f2f6e3afa8ef95f
2020-03-04 19:34:03 +00:00
Automerger Merge Worker
ada3844361 Merge "Remove return after GTEST_SKIP." am: b274746dd3
Change-Id: I3565a970f6d8accbb446ca52ef31eafe7c931129
2020-03-04 19:18:09 +00:00
Treehugger Robot
b274746dd3 Merge "Remove return after GTEST_SKIP." 2020-03-04 18:29:33 +00:00
Automerger Merge Worker
60d00d39a2 Merge "Update the scudo wrapper for bionic changes." am: 93517d1a27 am: 205790270a
Change-Id: Ic7af313f1f90a6e213f45a750e02c51c40601efd
2020-03-03 19:32:30 +00:00
Automerger Merge Worker
205790270a Merge "Update the scudo wrapper for bionic changes." am: 93517d1a27
Change-Id: I60f8ee282dbe8bb42ef0e87a00f5f31d1d0e58b3
2020-03-03 19:21:16 +00:00
Christopher Ferris
93517d1a27 Merge "Update the scudo wrapper for bionic changes." 2020-03-03 18:52:00 +00:00
Elliott Hughes
edaf03ea18 Remove return after GTEST_SKIP.
Test: treehugger
Change-Id: I5efc31f82a979fcd8d3051c72ed8e6201b3b0d1b
2020-02-28 18:27:09 -08:00
Automerger Merge Worker
b1550b6c03 Merge "[GWP-ASan] [heapprofd] Fix infinite recursion between malloc-racing threads." am: 0d303b42b5 am: 8bd2ab6a26
Change-Id: I630df05295f8780c77984f69f18a2888c73ff24d
2020-02-28 23:55:46 +00:00
Automerger Merge Worker
8bd2ab6a26 Merge "[GWP-ASan] [heapprofd] Fix infinite recursion between malloc-racing threads." am: 0d303b42b5
Change-Id: I99b2dcb85dd7798f38319af16eefb7a31ae1bc39
2020-02-28 23:39:27 +00:00
Mitch Phillips
0d303b42b5 Merge "[GWP-ASan] [heapprofd] Fix infinite recursion between malloc-racing threads." 2020-02-28 23:18:14 +00:00
Christopher Ferris
2c447b0586 Update the scudo wrapper for bionic changes.
Bug: 137795072

Test: Built using jemalloc, and verified that the two processes that
Test: use libc_scudo do not crash.
Change-Id: Icf773b656d7e2bcdf41b4979e9b6cd980b02d34d
2020-02-28 14:34:13 -08:00
Automerger Merge Worker
7d908042aa Merge "[GWP-ASan] Don't intercept calloc." am: 95c772f734 am: c61f25f47f
Change-Id: Ib3cf44809a15eefcdf8ca6bb3c17f3d517903e94
2020-02-28 21:38:45 +00:00
Automerger Merge Worker
ca95aae509 Merge "Switch to the arm-optimized-routines string routines on aarch64 where possible." am: ddedd9828b am: 85cf71fa3d
Change-Id: I6b6802c6e0f9b935b1ead7f1ff8ce2af598608dd
2020-02-28 21:38:32 +00:00
Automerger Merge Worker
c61f25f47f Merge "[GWP-ASan] Don't intercept calloc." am: 95c772f734
Change-Id: Ifa001a6bcd53cdd9aa7491b2f9951ba387a1fdf0
2020-02-28 21:27:29 +00:00