Something went wrong. Try again.
Reactos
Something went wrong. Try again.
[UCRT] Fix GCC/Clang SIMD compilation master
GCC and Clang need to mark functions that use SSE/AVX etc, either with a function attribute or a pragma around the function. strlen uses a template function that either uses SSE2 or AVX2. Previously the template was surrounded with pragmas to allow both SSE2 and AVX2, but that makes GCC assume that it can use AVX2 instructions even in the SSE2 version. To fix this the template instances are now build in individual compilation units for SSE2 and AVX, separate from the "dispatcher" function. Now ucrtbase doesn't crash anymore on GCC build. Another issue was the namespace around strnlen_mode, which has confused clang so much, that it forgot to instantiate the template code.
Author Timo Kreuzer Date (Jul 29, 2025, 6:22 AM UTC) Commit 719ea022 719ea022ec5d85a41c3df3d79ed22fe1f93c2db8 Parent e2deec82 e2deec82359fe01d377197d8825ca12162eae1f9