Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Issue 1813063002: Fix DrMemory warning in VS 2015 CRT (Closed)

Created:
4 years, 9 months ago by brucedawson
Modified:
4 years, 9 months ago
Reviewers:
oshima
CC:
chromium-reviews, glider+watch_chromium.org, bruening+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix DrMemory warning in VS 2015 CRT In VS 2015 builds every call to realloc triggers a warning like this: Error #1: INVALID HEAP ARGUMENT: allocated with Windows API layer, queried with C library layer 0 replace_malloc_usable_size 1 _recalloc_base 2 <lambda_4e60a939b0d047cfe11ddc22648dfba9>::operator() 3 __crt_seh_guarded_call<>::operator()<> 4 __acrt_lock_and_call<> 5 _register_onexit_function 6 _crt_atexit 7 _onexit 8 atexit 9 testing::`dynamic initializer for 'FLAGS_gmock_verbose'' This mismatch is harmless (because the CRT always uses the Windows heap) and out of our control. Therefore it should be suppressed. With this suppression I now get a clean run on this previously failing test: tools\valgrind\chrome_tests.bat -t content_browsertests --tool \ drmemory_light --build-dir=out\Release \ --gtest_filter=ManifestBrowserTest.DummyManifest BUG=440500, 594808 Committed: https://crrev.com/4ecae6cf0186d351706937b23d00ccaa5db9f1be Cr-Commit-Position: refs/heads/master@{#381840}

Patch Set 1 #

Patch Set 2 : Move suppression #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -0 lines) Patch
M tools/valgrind/drmemory/suppressions.txt View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
brucedawson
PTAL
4 years, 9 months ago (2016-03-17 21:29:02 UTC) #2
oshima
can you move it to "wrong analysis" section at the top of the file (or ...
4 years, 9 months ago (2016-03-17 22:02:20 UTC) #4
brucedawson
On 2016/03/17 22:02:20, oshima wrote: > can you move it to "wrong analysis" section at ...
4 years, 9 months ago (2016-03-17 23:14:44 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1813063002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1813063002/20001
4 years, 9 months ago (2016-03-17 23:22:00 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-17 23:56:54 UTC) #10
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/4ecae6cf0186d351706937b23d00ccaa5db9f1be Cr-Commit-Position: refs/heads/master@{#381840}
4 years, 9 months ago (2016-03-17 23:58:08 UTC) #12
Derek Bruening
I cannot reproduce the heap mismatch on ManifestBrowserTest.*. Additionally, this suppression has never been hit ...
4 years, 9 months ago (2016-03-20 02:36:24 UTC) #13
Derek Bruening
4 years, 9 months ago (2016-03-20 04:03:01 UTC) #14
Message was sent while issue was closed.
From the CL description up top:
> This mismatch is harmless (because the CRT always uses the Windows heap)
> and out of our control. Therefore it should be suppressed.

This is inaccurate.  Prior to VS2012, the CRT used a private heap, and only with
VS2012+ does it use the default process heap.  However, the debug CRT adds its
own redzone around the allocation returned by the Rtl layer, meaning that you
cannot mix heap alloc pointers between the two layers.  Thus, in general it is a
bug to allocate with one and free with the other, with real consequences such as
crashes.

Powered by Google App Engine
This is Rietveld 408576698