[libcxx-commits] [libcxx] [libc++] Optimize the std::mismatch tail (PR #83440)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 31 15:21:08 PDT 2024
philnik777 wrote:
> > @vitalybuka Where can I find the test that is failing?
>
> Isn't IncludeInserterTest.InsertCategoryHeaderObjectiveC the test?
>
> https://github.com/llvm/llvm-project/blob/82c6eeed08b1c8267f6e92d594c910fe57a9775e/clang-tools-extra/unittests/clang-tidy/IncludeInserterTest.cpp#L763
> ?
>
> If you have Ubuntu/Debian host, you can fully reproduce the bot, but I suspect it's unnecessary. https://github.com/google/sanitizers/wiki/SanitizerBotReproduceBuild
Thanks! I'm working on reproducing the issue right now, but I suspect that this is actually a bug in clang-tidy, since I don't see any check in the code to make sure that the second string at `clang-tools-extra/clang-tidy/utils/IncludeSorter.cpp:111` is at least as long as the first one. The solution is probably to use the two range overload of `mismatch` to avoid the out-of-bounds read.
https://github.com/llvm/llvm-project/pull/83440
More information about the libcxx-commits
mailing list