[libcxx-commits] [libcxx] [libc++] Fix the rest of __gnu_cxx::hash_XXX copy construction (PR #160525)

Alexander Kornienko via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 25 08:38:53 PDT 2025


alexfh wrote:

> @alexfh I've already landed #160043 and #160466 to fix the `multi*` containers. What is this patch fixing? I've checked and the non-`multi` containers don't seem affected.

@philnik777 oh nice, thanks for landing the second fix as well! It would be nice, if you let us know about it by responding to the comments on https://github.com/llvm/llvm-project/pull/151951, which caused the problem and where the issue was reported, or by answering a comment on https://github.com/llvm/llvm-project/pull/160043, which highlighted the incompleteness of the fix, or at the very least by including the context into the descriptions of your fixes (https://github.com/llvm/llvm-project/pull/160043 and https://github.com/llvm/llvm-project/pull/160466, neither of which mentions, which commit or which PR caused the problem this commit is fixing). Having cross-references in PRs and commit messages really helps understanding what happened and whether it was addressed, while silently landing fixes without responding to the reports results in confusion and sometimes (like in this case) in extra work being done by others.

As for the non-multi containers, my understanding is that they are also affected, but in a bit different way: their constructor will just repeat all the insertions of the elements from the source container, effectively being ~2x slower. I don't have any tests or benchmarks to back up my words, but just from looking at the code it looks like it is so.

https://github.com/llvm/llvm-project/pull/160525


More information about the libcxx-commits mailing list