[all-commits] [llvm/llvm-project] dac66c: [libc++] Fix dangling reference in the associative...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Jul 31 10:21:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dac66ca4776b18304249bb3a37f08915e5ad1bf4
      https://github.com/llvm/llvm-project/commit/dac66ca4776b18304249bb3a37f08915e5ad1bf4
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2026-07-31 (Fri, 31 Jul 2026)

  Changed paths:
    M libcxx/test/benchmarks/containers/associative/associative_container_benchmarks.h

  Log Message:
  -----------
  [libc++] Fix dangling reference in the associative container benchmarks (#213139)

Two insert benchmarks were registered with lambdas capturing insert_iter_iter_bench
by reference, unlike every other registration in this file, which captures by value.

RegisterBenchmark() stores the lambda by value and only invokes it from
RunSpecifiedBenchmarks(), which happens long after associative_container_benchmarks()
has returned, creating a dangling reference.



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