Regression: SafeBrowsingModuleVerifierWinTest.VerifyModuleRelocOverlap broken on 32-bit win after clang roll |
|||
Issue descriptionStarted failing here: https://build.chromium.org/p/chromium.fyi/builders/CrWinClang%28shared%29%20tester/builds/7043 SafeBrowsingModuleVerifierWinTest.VerifyModuleRelocOverlap (run #1): [ RUN ] SafeBrowsingModuleVerifierWinTest.VerifyModuleRelocOverlap ../../chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win_unittest.cc(307): error: Value of: VerifyModule(kTestDllNames[0], &state, &num_bytes_different) Actual: false Expected: true I only see the clang roll as related change :-(
,
Sep 9 2016
cc'ing grt from that other bug...
,
Sep 9 2016
I reproduced it locally, but I still don't understand it.
,
Sep 9 2016
OK, so it's another instance of the same kind of issue. DummyExport is < 256 bytes, and the test modifies 256 bytes of code, which runs into DllMain, and that causes the test to crash. I don't know why the clang roll regresses things, but if I generate > 256 bytes of code in DummyExport, it's OK.
,
Sep 9 2016
My first local fix was to have 27 volatile stores, each of which is 5 bytes, so it made 260 bytes of code. This failed flakily 25% of the time with the message: [ RUN ] SafeBrowsingModuleVerifierWinTest.VerifyModuleRelocOverlap ../../chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win_unittest.cc(312): error: Value of: num_bytes_different Actual: 206 Expected: kModificationSize Which is: 256 [ FAILED ] SafeBrowsingModuleVerifierWinTest.VerifyModuleRelocOverlap (10 ms) I replaced my run of stores with 256 calls to __nop, and the problem went away. This apparently has to do with the distance between relocations, which the test is sensitive to. I don't know why it's non-deterministic, but I've found a determinstic solution, so I'm sending that out.
,
Sep 9 2016
I still don't know what's different about our binaries that is causing DllMain to run in the test DLL. Maybe MSVC's code for DllMain increments to something "safe", like RET, coincidentally.
,
Sep 9 2016
Could the nondeterminism be due to link.exe /INCREMENTAL?
,
Sep 9 2016
I'm not rebuilding between re-running, though, I'm just using --`gtest_repeat=200 | grep FAILURE.*stuff | wc -l`
,
Sep 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/38eb7adb1ff6ab5d5151fd47bf251e12da7db0e2 commit 38eb7adb1ff6ab5d5151fd47bf251e12da7db0e2 Author: rnk <rnk@chromium.org> Date: Mon Sep 12 15:27:57 2016 Fix module verifier test by padding out DummyExport with 256 bytes of nops The test increments 256 bytes of code starting from the beginning of the DLL, and if we don't pad out DummyExport, it will modify DllMain, which can run when a thread starts. R=grt@chromium.org,thakis@chromium.org BUG= 645544 Review-Url: https://codereview.chromium.org/2327193002 Cr-Commit-Position: refs/heads/master@{#417944} [modify] https://crrev.com/38eb7adb1ff6ab5d5151fd47bf251e12da7db0e2/chrome/browser/safe_browsing/incident_reporting/verifier_test/verifier_test_dll.cc
,
Sep 12 2016
Cycled green: https://build.chromium.org/p/chromium.fyi/builders/CrWinClang%20tester/builds/9014 https://build.chromium.org/p/chromium.fyi/builders/CrWinClang%20tester/builds/9015 |
|||
►
Sign in to add a comment |
|||
Comment 1 by r...@chromium.org
, Sep 9 2016