-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use SHA256 by default in command line compilers #24820
Conversation
@jinujoseph @MattGertz Looks like the extra processing time of SHA256 is within the noise. The Portable PDB size increase of 1% is acceptable imo. The Windows PDB did not grow since it contains a lot of padding and alignment that was consumed by the larger hashes. |
Groovy. @jac009 any concerns? This is in reference to the meeting we had on this transition last week. |
@MattGertz Very torn on this. Would really like to understand what level of testing for teams that rely on PDBs (debuggers, profilers, Watson etc.) has been done. |
@jac009 I'll get that info from the respective teams. The VS debugger has supported SHA256 since one of the Dev14 updates, VS Code and VS Mac Core CLR debugger since day one. |
* Use SHA256 by default in command line compilers (/checksumalgorithm switch) * Update XLF
Customer scenario
The C# and VB command line compilers and build tasks use SHA1 by default for calculating hashes of source files stored in PDBs. It has already been possible to explicitly request SHA256 algorithm by specifying
/checksumalgorithm:SHA256
on command line or settingChecksumAlgorithm
property in project file. This change makes SHA256 the default since SHA1 is no longer an acceptable crypto hash algorithm.Bugs this fixes
Workarounds, if any
Set the algorithm explicitly.
Risk
Small.
Performance impact
Small.
I measured build of
Microsoft.CodeAnalysis.dll
in several configurations. The difference in compilation time between SHA1 and SHA256 is not measurable in end-to-end scenario. The size difference is 1% for Portable PDBs and none in Windows PDBs (due to section alignment).Time (s)
PDB size (B)
Method:
where args are:
Is this a regression from a previous update?
Root cause analysis
How was the bug found?
Test documentation updated?