Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The backend was introduced in #312. The bug was reported in #313 (comment).
AVX part of the backend works correctly, the issue arises only in the AVX2 part (i.e. when we process two blocks at once). Interestingly enough this bug was not caught by the "1 million a" test for SHA-512, so this bug requires two different blocks. Our tests for SHA-384 and SHA-512 are probably too short for exposing this bug (we need a message of at least 256 bytes for that).
For now I only added a reproduction test. I will try to fix this bug a bit later.
cc @jplatte @Rexagon