https://bugs.llvm.org/show_bug.cgi?id=51957
Bug ID: 51957
Summary: Miscompilation in Botan's SHA3 with optimization -O2
and -O3
Product: clang
Version: 12.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: llvm-bugzi...@renemeusel.de
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
Clang 12 and Apple Clang 13 seem to cause a miscompilation for optimization
levels -O2 and -O3 in the C++ SHA3 implementation of the Botan library.
GitHub issue with detailed investigation steps and a minimal reproducer that
doesn't depend on Botan:
https://github.com/randombit/botan/issues/2802#issuecomment-926055635
GitHub pull request with a workaround:
https://github.com/randombit/botan/pull/2803
In the reproducing program, wrong results seem to surface in line 3 of
SHA3_round():
const uint64_t C2 = A[2] ^ A[7] ^ A[12] ^ A[17] ^ A[22];
for the given input values, the result in C2 would be too large to fit into a
64-bit signed integer. FWIW.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs