Commit graph

8 commits

Author SHA1 Message Date
Pirama Arumuga Nainar
02ab36e220 Do not construct std::function with Allocator argument
Bug: http://b/116702964

This breaks when built with C++17, where these constructors are removed.
Looks like libc++ ignored the allocator arguments anyway - so this
should be NFC even with C++17.

Test: memunreachable_test on the host and Sailfish with C++14, C++17
Change-Id: I638326a900781f64d0562b5ec38e990659967039
2018-09-26 20:24:13 +00:00
Colin Cross
eac4ecc34f Fix ScopedSignalHandler
I4ae2d82fdfdd58cf8ef1dfb6c401cef4ba9d3e88 broke memunreachable_test
by replacing signal_ with signal.

Test: memunreachable_test
Change-Id: I8148321e3a94530867106708a33b5b63ed867380
2017-06-29 17:13:35 -07:00
Colin Cross
a9939e9a23 Move libmemunreachable into namespace android
Putting libmemunreachable in the global C++ namespace was an oversight,
move it into namespace android.

Test: m -j checkbuild
Change-Id: I0799906f6463178cb04a719bb4054cad33a50dbe
2017-06-22 10:58:23 -07:00
Colin Cross
a83881e33c libmemunreachable: clang-format everything
clang-format -i --sort-includes $(find . -name "*.cpp" -o -name "*.h")

Test: builds
Change-Id: Ia8e0677fe7f3f26dddba3a851cd2dfab9f14e421
2017-06-22 10:58:05 -07:00
Elliott Hughes
56731b4e2f Shave a stack frame off asserts.
We can't implement MEM_LOG_ALWAYS_FATAL_IF any more, but it wasn't really
useful anyway.

Bug: N/A
Test: ran `crasher assert` and `crasher64 assert`
Change-Id: I4ae2d82fdfdd58cf8ef1dfb6c401cef4ba9d3e88
2017-06-20 17:31:29 -07:00
Christopher Ferris
47dea71b16 Move all logging to use the async safe logging.
Also, add a link to the .clang-format-2 for this directory and clang
format the files that changed.

Bug: 31919199

Test: Boot bullhead.
Test: Run unit tests on bullhead. There are a few that fail, but they
Test: failed before and are not a result of this change.
Change-Id: I3d3b2111f6f6bf8a0d7039295d34d5168c191651
2017-05-03 18:04:18 -07:00
Chih-Hung Hsieh
034c475931 Fix google-explicit-constructor warnings in system/core.
* Declare explicit conversion constructors.
* Add NOLINT for implicit conversion constructors.
* Fix also some misaligned indendations.

Bug: 28341362
Change-Id: Idf911f35923b408d92285cc1a053f382ba08c63e
Test: build with clang-tidy
2016-07-26 11:26:01 -07:00
Colin Cross
0965c0247b Handle segfaults while walking native heap
Vendor blobs on ryu mprotect heap pages, causing segfaults when dumping
unreachable memory.  Handle segfaults within HeapWalker by mapping a
zero page over any unreadable pages.  HeapWalker runs in the forked
process, so the mapping will not affect the original process.

Bug: 28269332
Change-Id: I16245af722123f2ad467cbc6f245a70666c55544
(cherry picked from commit ba5d9ff6d9)
2016-04-29 15:14:06 -07:00