summaryrefslogtreecommitdiffstats
path: root/base/process/memory.h
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-29 17:30:40 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-29 17:30:40 +0000
commite24b74fe09d92384df55ce53436b1d5dcb309042 (patch)
treeefc1ee3b6c063f7bf592937f76bb979d0aca0482 /base/process/memory.h
parentdbe2ca2be4035c7c051db2839fb3eb23ce8926aa (diff)
downloadchromium_src-e24b74fe09d92384df55ce53436b1d5dcb309042.zip
chromium_src-e24b74fe09d92384df55ce53436b1d5dcb309042.tar.gz
chromium_src-e24b74fe09d92384df55ce53436b1d5dcb309042.tar.bz2
Update code related to OOM errors in sanitizer builds.
Remove outdated comment and enable OOM tests under sanitizers. Also, document the fact that the newly introduced UncheckedMalloc()/UncheckedCalloc() don't work as intended in sanitizer builds. BUG=357732 R=thakis@chromium.org Review URL: https://codereview.chromium.org/217343002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process/memory.h')
-rw-r--r--base/process/memory.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/base/process/memory.h b/base/process/memory.h
index a930be7..a73fbe1 100644
--- a/base/process/memory.h
+++ b/base/process/memory.h
@@ -67,6 +67,8 @@ BASE_EXPORT bool AdjustOOMScore(ProcessId process, int score);
// This can be useful for huge and/or unpredictable size memory allocations.
// Please only use this if you really handle the case when the allocation
// fails. Doing otherwise would risk security.
+// These functions may still crash on OOM when running under memory tools,
+// specifically ASan and other sanitizers.
// Return value tells whether the allocation succeeded. If it fails |result| is
// set to NULL, otherwise it holds the memory address.
BASE_EXPORT WARN_UNUSED_RESULT bool UncheckedMalloc(size_t size,