[PATCH] D44275: Add the ability to stamp a PDB / EXE with a given GUID / Age, and use it to test LLD reproducibility
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 8 14:30:55 PST 2018
zturner created this revision.
zturner added reviewers: ruiu, rnk.
Herald added a subscriber: hiraditya.
The idea here is that we want to test
a) That we write a valid timestamp (i.e. hash) into the PE file
and
b) That this doesn't affect determinism,
but it's difficult because the generated PDB GUID is currently not deterministic, so this non-deterministic value gets written into the PE. There's ideas to fix this, but for now we would still like to be able to test that this is the *only* source of non determinism. To deal with this, this patch introduces a subcommand to `llvm-pdbutil` which will stamp either an EXE or PDB with a specified GUID and age, then recompute the hash of the executable and update the various timestamp fields.
Two tests are introduced, one which verifies that two identical links without /DEBUG generate the same binary, and another which verifies that two identical links with /DEBUG generate the same binary provided they are stamped with the same GUID and Age.
https://reviews.llvm.org/D44275
Files:
lld/test/COFF/repro-debug-clean.test
lld/test/COFF/repro-nodebug.test
llvm/include/llvm/ADT/StringExtras.h
llvm/include/llvm/DebugInfo/PDB/PDB.h
llvm/include/llvm/Object/COFF.h
llvm/lib/Object/COFFObjectFile.cpp
llvm/tools/llvm-pdbutil/llvm-pdbutil.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44275.137656.patch
Type: text/x-patch
Size: 14574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180308/ad4054c7/attachment.bin>
More information about the llvm-commits
mailing list