Skip to content

Commit a7d3d8a

Browse files
zmodemcopybara-github
authored andcommitted
[clang] Add debugging printfs to the Win ASan runtime
The cherry-picked patch does three things: 1) It changes ASan's VPrintf function to store any output above the current verbosity level, which would otherwise have been discarded, to an internal fixed-size buffer. 2) It adds code to dump that buffer on some code paths, such as on CHECK() failures. 3) It adds VPrintf calls throughout the Windows interception code, to make it easier to follow that process either by running with ASAN_OPTIONS=verbosity=5 or when a failure occurs. The linked bug has so far proved hard to reproduce locally and on trybots. By landing this, the idea is that we will get the information we need when the bug does pop up on a buildbot, without disturbing successful runs. Bug: 341936875 Change-Id: I4b7b7e4c6bf7780b1a29289fbdb274335dc84f37 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5853980 Auto-Submit: Hans Wennborg <[email protected]> Reviewed-by: Nico Weber <[email protected]> Commit-Queue: Nico Weber <[email protected]> Cr-Commit-Position: refs/heads/main@{#1354490} NOKEYCHECK=True GitOrigin-RevId: aa89dcf8ac1e11af405411f4908745698cff8cb6
1 parent eb8f9c2 commit a7d3d8a

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

build_rust.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
'scripts'))
5656

5757
from build import (AddCMakeToPath, AddZlibToPath, CheckoutGitRepo, CopyFile,
58-
DownloadDebianSysroot, GetLibXml2Dirs, LLVM_BUILD_TOOLS_DIR,
59-
RunCommand)
58+
DownloadDebianSysroot, GetLibXml2Dirs, GitCherryPick,
59+
LLVM_BUILD_TOOLS_DIR, RunCommand)
6060
from update import (CHROMIUM_DIR, DownloadAndUnpack, EnsureDirExists,
6161
GetDefaultHostOs, RmTree, UpdatePackage)
6262

@@ -553,25 +553,6 @@ def BuildLLVMLibraries(skip_build):
553553
])
554554

555555

556-
def GitCherryPick(git_repository, git_remote, commit):
557-
print(f'Cherry-picking {commit} in {git_repository} from {git_remote}')
558-
git_cmd = ['git', '-C', git_repository]
559-
RunCommand(git_cmd + ['remote', 'add', 'github', git_remote],
560-
fail_hard=False)
561-
RunCommand(git_cmd +
562-
['fetch', '--recurse-submodules=no', 'github', commit])
563-
is_ancestor = RunCommand(git_cmd +
564-
['merge-base', '--is-ancestor', commit, 'HEAD'],
565-
fail_hard=False)
566-
if is_ancestor:
567-
print('Commit already an ancestor; skipping.')
568-
return
569-
RunCommand([
570-
'git', '-C', git_repository, 'cherry-pick', '--keep-redundant-commits',
571-
commit
572-
])
573-
574-
575556
# Move a git submodule to point to a different branch.
576557
#
577558
# This is super non-trivial because the submodules are shallow, and thus

0 commit comments

Comments
 (0)