[all-commits] [llvm/llvm-project] fb0076: [libc++] Fix calling push_heap on an empty range i...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Sep 29 10:30:35 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb00768dcf426f7dacda4af300d958368256e530
      https://github.com/llvm/llvm-project/commit/fb00768dcf426f7dacda4af300d958368256e530
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2026-09-29 (Tue, 29 Sep 2026)

  Changed paths:
    M libcxx/test/benchmarks/algorithms/sorting/push_heap.bench.cpp

  Log Message:
  -----------
  [libc++] Fix calling push_heap on an empty range in the push_heap benchmark (#227076)

std::push_heap requires a non-empty range because it inserts the element
at position `last - 1` (which isn't valid for an empty range) into the
heap. This didn't show up as a problem with libc++ since we have a
defensive implementation, but libstdc++ does not.



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