[Core] Clay__HashData SIMD version bug
Author: cppimprovCreated Jul 20, 2025Updated Sep 30, 2026
Labelsbug
I have found that with certain strings, clay doesn't correctly call measure text, and provides an incorrect text length. Specifically I was having trouble with a string of length 16, consisting entirely of '#' characters. Clay consistently told me this string had a length of 32.
It turns out that clay wasn't actually calling the measure text function for this string. This happened because CLAY__HashStringContentsWithConfig was always returning 1, because Clay__HashData returned 0.
If I set the CLAY_DISABLE_SIMD flag, this issue goes away, so I assume the problem is somewhere in the SIMD version of Clay__HashData. I don't know enough about SIMD (or hashing) to try to find it.
(On MSVC Version 19.36.32532 for x64).
Source: nicbarker/clay