diff options
author | Iris Chang <iris.chang@mediatek.com> | 2019-01-16 11:17:15 +0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2019-01-22 15:54:36 -0800 |
commit | 7f209a979c55a58e91946a2efd5f0b339ffe309c (patch) | |
tree | 481e04cf25531a9ced30b032bb5ba93f06de674e /libc/malloc_debug/Config.cpp | |
parent | 822326db922ac5d0e4dea8cff1d774e8f04db94a (diff) |
Bionic malloc debug: add a new option "abort_on_error"
This new option causes an abort after malloc debug detects an error.
This allows vendors to get process coredumps to analyze memory for
corruption.
Bug: 123009873
Test: New test cases added for unit tests and config tests.
Change-Id: I6b480af7f747d6a82f61e8bf3df204a5f7ba017f
Diffstat (limited to 'libc/malloc_debug/Config.cpp')
-rw-r--r-- | libc/malloc_debug/Config.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/malloc_debug/Config.cpp b/libc/malloc_debug/Config.cpp index 926b26581..dd20b5cd5 100644 --- a/libc/malloc_debug/Config.cpp +++ b/libc/malloc_debug/Config.cpp @@ -132,6 +132,9 @@ const std::unordered_map<std::string, Config::OptionInfo> Config::kOptions = { { "verify_pointers", {TRACK_ALLOCS, &Config::VerifyValueEmpty}, }, + { + "abort_on_error", {ABORT_ON_ERROR, &Config::VerifyValueEmpty}, + }, }; bool Config::ParseValue(const std::string& option, const std::string& value, size_t min_value, |