[PATCH] D92787: Update missing_pdb.test input binary to point to a more likely non-removable media path

Douglas Yung via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 7 14:08:22 PST 2020


dyung created this revision.
dyung added a reviewer: rnk.
dyung added a project: LLVM.
Herald added a subscriber: rupprecht.
Herald added a reviewer: jhenderson.
dyung requested review of this revision.
Herald added a subscriber: MaskRay.

The test llvm/test/tools/llvm-symbolizer/pdb/missing_pdb.test recently started failing on our internal build bots, and I tracked down the issue to the path of the "missing" pdb that the test is looking for. The test has llvm-symbolizer searching for the pdb at "D:\src\llvm\build\missing_pdb.pdb". The file does not exist and the lookup should fail, and the test checks for the expected error message "No such file or directory". The problem is that when D:\ is mapped to a removable media drive such as a DVD drive as on our build machine, the error returned instead is "resource unavailable try again" causing the test to fail.

Since the source for the test is unavailable, I am fixing this by modifying the path in the executable to be "C:\" instead of "D:\". The problem could still occur if C:\ is mapped to a removable media drive on Windows, but I feel the problem is going to rare since it has been the Windows default to install itself on to the C:\ drive which must be a hard drive.

Since the change is a binary change (and literally only 1 bit), I did a hex dump before and after my change for the review:

$ diff original.txt new.txt 
403c403

< 00057c0 7d77 7e04 0001 0000 3a44 735c 6372 6c5c
-------------------------------------------------

> 00057c0 7d77 7e04 0001 0000 3a43 735c 6372 6c5c

You can see the one bit change from 44 to 43, which corresponds to the hexadecimal number for the ASCII 'D' and 'C' characters respectively.

Let me know if there are any objections to this fix.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92787

Files:
  llvm/test/tools/llvm-symbolizer/pdb/Inputs/missing_pdb.exe






More information about the llvm-commits mailing list