[all-commits] [llvm/llvm-project] a9f384: [libc++] Counter<T>'s assignment operator shouldn'...

Quuxplusone via All-commits all-commits at lists.llvm.org
Tue Feb 14 09:58:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9f384994b9da72ba23ad8aa9450caed42fdfcf3
      https://github.com/llvm/llvm-project/commit/a9f384994b9da72ba23ad8aa9450caed42fdfcf3
  Author: Arthur O'Dwyer <arthur.j.odwyer at gmail.com>
  Date:   2023-02-14 (Tue, 14 Feb 2023)

  Changed paths:
    M libcxx/test/support/Counter.h

  Log Message:
  -----------
  [libc++] Counter<T>'s assignment operator shouldn't ++gConstructed

This has been here since d5f461ca03e30, but assigning into an existing
Counter object definitely doesn't create a new object. This causes the
count to "leak" higher and higher, inside algorithms based on swapping.




More information about the All-commits mailing list