-
Notifications
You must be signed in to change notification settings - Fork 24
Make PDB builds reproducible #2
Comments
Fixed with f4241a1. |
I believe this issue has to be reopened, because even the most trivial program (empty main) produces non-deterministic PDBs (with VS2015): @setlocal
@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 || exit /b 1
cl
echo.
ducible --version
echo.
echo int main(int, char**) { return 0; }> main.cpp
for %%i in (1,2) do (
cl /nologo /Zi main.cpp /link /incremental:no >NUL || exit /b 1
ducible main.exe main.pdb >NUL || exit /b 1
move main.exe main.%%i.exe >NUL || exit /b 1
move main.pdb main.%%i.pdb >NUL || exit /b 1
del vc140.pdb || exit /b 1
del main.obj || exit /b 1
)
fc main.1.exe main.2.exe >NUL 2>&1 && echo EXE identical || ( echo EXE different && exit /b 1)
fc main.1.pdb main.2.pdb >NUL 2>&1 && echo PDB identical || ( echo PDB different && exit /b 1) Results in the following output:
|
@l0calh05t I can reproduce that problem with the test suite with VS2017 (I don't have VS2015 installed currently). I guess getting reproducible PDBs is a moving target. It looks like the I probably won't have time to dig into this in the near future, but from glancing at the hexdump it looks like there are some source file paths in the PDB that aren't in sorted order. If anyone else has the gusto to fix this, I'll happily take a PR for it. 😉 |
I‘m fairly certain that I also tried |
I just re-checked. And |
Currently, PDB files are not patched to remove non-determinism.
This presents a larger challenge than just patching the PE file alone, because:
References:
The text was updated successfully, but these errors were encountered: