Landing: 225fb1e77197

Project / Subsystem

gcc / gcc/ipa

Date

2026-06-10

Author

Andrew Pinski

Commit

225fb1e771972091445019f490b9a487b8b821fb

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/ipa
patch_id
commit_hash
225fb1e771972091445019f490b9a487b8b821fb
source_type
github
headline
IPA fixes a lifetime issue with hash_map in debug expression preparation.
tldr
GCC's Interprocedural Analysis (IPA) pass now correctly handles the lifetime of `hash_map` elements when preparing debug expressions, preventing potential data…
author
Andrew Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • ipa
  • bugfix
  • data-structures
discussion_id_link
bugzilla_pr
date
2026-06-10T00:00:00.000Z

This commit resolves a lifetime issue in the Interprocedural Analysis (IPA) pass concerning the use of hash_map::put within prepare_debug_expressions. Previously, dereferencing the result of hash_map::get directly as the second argument to put could lead to data corruption if the hash map resized, invalidating the reference. The fix ensures that the retrieved tree pointer is copied by value before being passed to put, thus guaranteeing its stability even if the hash map reallocates its internal storage.