From af0fd4eb99437a7a914d26d2fca409fc3547e674 Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Tue, 28 Mar 2017 11:17:49 -0700 Subject: [PATCH] Update to VS packaging script for dbghelp.dll bug The versions of dbghelp.dll that ship with the latest 10.0.14393.0 SDK (yes, there are multiple versions) as of the VS 2017 launch cannot handle /debug:fastlink binaries created by VS 2017. This leads to hangs during symbol lookup, as reported here: https://developercommunity.visualstudio.com/content/problem/36255/chromes-base-unittests-fails-with-vs-2017-due-to-s.html The recommended fix is to copy dbghelp.dll from the VS install instead, from Common7\IDE\CommonExtensions\Microsoft\TestWindow\Extensions\CppUnitFramework Without this fix base_unittests will hang and windbg will not work on /debug:fastlink binaries. With this fix base_unittests completes promptly. BUG=683729 Change-Id: Ie58b9d898a1feb04f11e99891035d2e40a2a9c0f Reviewed-on: https://chromium-review.googlesource.com/461385 Reviewed-by: Scott Graham Commit-Queue: Bruce Dawson --- win_toolchain/package_from_installed.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/win_toolchain/package_from_installed.py b/win_toolchain/package_from_installed.py index 2b6766413..461c1a730 100644 --- a/win_toolchain/package_from_installed.py +++ b/win_toolchain/package_from_installed.py @@ -149,6 +149,21 @@ def BuildFileList(override_dir): if tail.count(WIN_VERSION) == 0: continue to = os.path.join('win_sdk', tail) + # The versions of dbghelp.dll that ship with the latest 10.0.14393.0 SDK + # (yes, there are multiple versions) as of the VS 2017 launch cannot + # handle /debug:fastlink binaries created by VS 2017. This leads to hangs + # during symbol lookup, as reported here: + # https://developercommunity.visualstudio.com/content/problem/36255/chromes-base-unittests-fails-with-vs-2017-due-to-s.html + # The recommended fix is to copy dbghelp.dll from the VS install instead, + # as done here: + if VS_VERSION == '2017' and combined.endswith('dbghelp.dll'): + good_dbghelp_path = os.path.join(vs_path, 'Common7', 'IDE', + 'CommonExtensions', 'Microsoft', 'TestWindow', + 'Extensions', 'CppUnitFramework') + if combined.count('\\x64\\') > 0: + combined = os.path.join(good_dbghelp_path, 'x64', 'dbghelp.dll') + else: + combined = os.path.join(good_dbghelp_path, 'dbghelp.dll') result.append((combined, to)) # Copy the x86 ucrt DLLs to all directories with 32-bit binaries that are