Landing: 50cbacfaa1e7
Project / Subsystem
gcc / libstdc++
Date
2026-06-23
Author
Tomasz Kamiński
Commit
50cbacfaa1e776b7ab36070f7f61873b092fd71f
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 50cbacfaa1e776b7ab36070f7f61873b092fd71f
- source_type
- github
- headline
- libstdc++ safely handles unrecognized format_arg types
- tldr
- Format library now uses a fallback mechanism for unrecognized argument types, preventing UB and improving compatibility.
- author
- Tomasz Kamiński
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • format
- • abi
- • compatibility
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-23T00:00:00.000Z
The C++ format library in libstdc++ now gracefully handles unrecognized _Arg_t values in basic_format_arg. Instead of calling __builtin_unreachable which can lead to undefined behavior, a new _M_handle_unrecognized method is invoked. This ensures backward compatibility when newer library versions are used with older binaries, preventing crashes and providing better runtime robustness.