Commit 93e1a76e authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Actually enable crash dump collection on builders

Change crrev.com/1825163003 attempted to enable crash dump collection
on build machines, and it worked fine on local testing. However it only
worked because local testing was done using 64-bit Python. The builders
use python from depot_tools which is 32-bit Python so the changes all
went to "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft" instead of
to "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft", which means they were
ignored. For a year. This made investigation of linker crashes more
complicated than needed.

This change uses the necessary winreg.KEY_WOW64_64KEY dance so that the
64-bit registry is always used, whether running 32-bit Python or 64-bit
Python. Both versions were tested locally. The behavior on 32-bit
Windows is unknown but we don't support building on 32-bit Windows
anyway, and any failures would be rendered harmless by the try/except
block.

R=scottmg@chromium.org
BUG=704286

Change-Id: I6abc0e1e9c69b9a4e4b9c705bea9e4faadd0945c
Reviewed-on: https://chromium-review.googlesource.com/473567Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
Reviewed-by: 's avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 2b4ac398
......@@ -374,7 +374,8 @@ def EnableCrashDumpCollection():
if sys.platform == 'win32' and os.environ.get('CHROME_HEADLESS') == '1':
key_name = r'SOFTWARE\Microsoft\Windows\Windows Error Reporting'
try:
key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, key_name)
key = winreg.CreateKeyEx(winreg.HKEY_LOCAL_MACHINE, key_name, 0,
winreg.KEY_WOW64_64KEY | winreg.KEY_ALL_ACCESS)
# Merely creating LocalDumps is sufficient to enable the defaults.
winreg.CreateKey(key, "LocalDumps")
# Disable the WER UI, as documented here:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment