[all-commits] [llvm/llvm-project] 2265d3: [pdb] Fix libc++ strict-weak-ordering assertion fa...
Hans Wennborg via All-commits
all-commits at lists.llvm.org
Fri Feb 27 08:31:33 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2265d3240f23c1c6ff7b4d0fa2711a9ed36fdc8a
https://github.com/llvm/llvm-project/commit/2265d3240f23c1c6ff7b4d0fa2711a9ed36fdc8a
Author: Hans Wennborg <hans at hanshq.net>
Date: 2026-02-27 (Fri, 27 Feb 2026)
Changed paths:
M llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
Log Message:
-----------
[pdb] Fix libc++ strict-weak-ordering assertion failures from gsiRecordCmp (#183749)
Builds using libc++ hardening was hitting asserts like
libc++ Hardening assertion
!__comp(*(__first + __a), *(__first + __b)) failed:
Your comparator is not a valid strict-weak ordering
printf-debugging revealed that symbols like "?ST@@3JA" were not
comparing equal with themselves. It turns out the comparison was done
with
return S1.compare_insensitive(S2.data());
and even when &S1 == &S2, S1 and S2.data() may not refer to identical
strings, since data() may not have a null terminator where the StringRef
locally ends.
This fixes the ordering, simplifies the code, and makes it a little
faster :)
Fixes: #163755
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list