jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.06k stars 1.72k forks source link

Assert failure observed on box_seal test #1388

Closed byron-hawkins closed 4 days ago

byron-hawkins commented 4 days ago

While benchmarking performance on the libsodium tests, we encountered an assert failure in the box_seal test at line 68 in the stable branch (May 24):

assert(m_len == 0 || memcmp(cm, m2, m_len) != 0);

It appears to be a special case because this assert has only failed once over millions of iterations of the test. A core file is attached. Binaries were built with a local toolchain of clang and ld.lld (LLVM 17) with -flto on Fedora 38 x86_64.

box_seal.core.tar.gz

jedisct1 commented 4 days ago

Good catch, thank you!