SafeBrowsingEnvironmentDataCollectionWinTest.VerifyLoadedModules failing on WinASan bot (again) |
||
Issue descriptionThis test is failing because clang is able to optimize DummyExport down to just "RET", which is folded by ICF with all other functions that just return. It just so happens that one of those functions is registered as an at-exit time destructor. The VerifyLoadedModules test uses WriteProcessMemory to increment the first byte of DummyExport. However, because of comdat folding, this modifies all the other no-op functions that were folded with DummyExport. The at-exit destructor is called during module unload time, and it crashes, causing the test to fail. The solution is simple: volatilize the global variable store to defeat clang's dead store deletion and the follow-on ICF by the linker. P.S. This was very "fun" to debug.
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/98b87cf47c62669a1bcd67f0db868c31482605a1 commit 98b87cf47c62669a1bcd67f0db868c31482605a1 Author: rnk <rnk@chromium.org> Date: Wed Aug 10 20:25:07 2016 Volatilize the global store in DummyExport to defeat Clang's optimizer and avoid ICF Otherwise this test crashes under ASan while running a corrupted at-exit handler. R=grt@chromium.org,thakis@chromium.org BUG= 636157 Review-Url: https://codereview.chromium.org/2228233002 Cr-Commit-Position: refs/heads/master@{#411134} [modify] https://crrev.com/98b87cf47c62669a1bcd67f0db868c31482605a1/chrome/browser/safe_browsing/incident_reporting/verifier_test/verifier_test_dll.cc
,
Sep 13 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by r...@chromium.org
, Aug 9 2016