Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove global optimizations for SHA1ProcessMessageBlock() #2293

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

StephenCWills
Copy link
Member

I recently noticed that save files from my Debug builds in Visual Studio 2022 were incompatible with my Release builds and vice-versa. I tracked it down to the Global Optimizations flag (/Og) in the compiler, which is included in the list of optimizations turned on by both /O1 and /O2.

My version of MSVC in VS2022 is _MSC_VER == 1939. I figured this was caused by a fairly recent change in MSVC so I tested in VS2019 _MSC_VER == 1929 as well. The optimization works fine in VS2019 so in lieu of trying to install and test every version of VS2022 to narrow it down further, I just disabled the optimization for this one function for all versions of VS2022.

@AJenbo AJenbo merged commit bbda8dd into diasurgical:master Apr 17, 2024
5 of 6 checks passed
@StephenCWills StephenCWills deleted the sha1-global-optimizations branch April 17, 2024 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants