Landing: c1a660d44be3

Project / Subsystem

gcc / libstdc++

Date

2026-10-01

Author

Jonathan Wakely

Commit

c1a660d44be3dc140b7ff24611e8ff7a4557d761

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
—
commit_hash
c1a660d44be3dc140b7ff24611e8ff7a4557d761
source_type
github
headline
libstdc++: Fix debug mode for pb_ds ordered-vector trees
tldr
Fixes rare debug mode assertions in pb_ds ordered-vector trees that could be triggered by time-based seeds or incorrect memory allocation.
author
Jonathan Wakely
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libstdc++
  • • debug
  • • bugfix
discussion_id_link
—
bugzilla_pr
—
date
2026-10-01T00:00:00.000Z

This commit addresses rare debug mode assertions in libstdc++‘s policy-based data structures (pb_ds) ordered-vector trees. It introduces a way to override the time-based random seed for reliable failure triggering and fixes an exception-safety bug in erase_if where container modifications were not rolled back. Additionally, it corrects an issue in erase(It) that caused a crash when deallocating the last element and makes copy_from_ordered_range safer by preventing allocation of zero-sized memory.