diff options
author | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 06:14:42 +0000 |
---|---|---|
committer | rtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-24 06:14:42 +0000 |
commit | e8f2d48acf88ba88c6e4fcc983e921e575bace55 (patch) | |
tree | 8852f73816fdc7a95e743ab6ec023c65b19a80d4 /third_party | |
parent | 5a3ecaaef4cb622ea94d8278cde6ade46066427e (diff) | |
download | chromium_src-e8f2d48acf88ba88c6e4fcc983e921e575bace55.zip chromium_src-e8f2d48acf88ba88c6e4fcc983e921e575bace55.tar.gz chromium_src-e8f2d48acf88ba88c6e4fcc983e921e575bace55.tar.bz2 |
Revert 79258 - Mark all the free'ed region with special markers so that browser
will crash if free'ed memory is accessed (hoping to detect the
memory corrupters).
Landed the original CL to get results from stability tests.
BUG=76891
TBR=jar
Review URL: http://codereview.chromium.org/6676098
TBR=rtenneti@chromium.org
Review URL: http://codereview.chromium.org/6732018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79259 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/tcmalloc/chromium/src/tcmalloc.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/third_party/tcmalloc/chromium/src/tcmalloc.cc b/third_party/tcmalloc/chromium/src/tcmalloc.cc index 629f4e0..e702256 100644 --- a/third_party/tcmalloc/chromium/src/tcmalloc.cc +++ b/third_party/tcmalloc/chromium/src/tcmalloc.cc @@ -1615,7 +1615,7 @@ void *(*__memalign_hook)(size_t, size_t, const void *) = MemalignOverride; // It will cost abotu 2% in performance, but it will catch double frees (most of // the time), and will often catch allocated-buffer overrun errors. This // validation is only active when TCMalloc is used as the allocator. -#define TCMALLOC_VALIDATION +// #define TCMALLOC_VALIDATION #if !defined(TCMALLOC_VALIDATION) @@ -1738,10 +1738,6 @@ static void ValidateAllocatedRegion(void* ptr, size_t cl) { if (current_mark != allocated_mark) DieFromMemoryCorruption(); *mark = ~allocated_mark; // Distinctively not allocated. - // Copy the mark into all the free'd region. - size_t class_size = static_cast<size_t>(reinterpret_cast<char*>(mark) - - reinterpret_cast<char*>(ptr)); - memset(ptr, static_cast<char>(0x36), class_size); } static void MarkAllocatedRegion(void* ptr) { |