[all-commits] [llvm/llvm-project] ad30f6: [NFC] Fix use-after-free: track TargetLibraryAnaly...
Daniel Paoliello via All-commits
all-commits at lists.llvm.org
Thu Mar 5 09:29:33 PST 2026
Branch: refs/heads/release/22.x
Home: https://github.com/llvm/llvm-project
Commit: ad30f6e88e654a5919984a74b1e6152df4d761be
https://github.com/llvm/llvm-project/commit/ad30f6e88e654a5919984a74b1e6152df4d761be
Author: Daniel Paoliello <danpao at microsoft.com>
Date: 2026-03-05 (Thu, 05 Mar 2026)
Changed paths:
M llvm/lib/Analysis/BasicAliasAnalysis.cpp
Log Message:
-----------
[NFC] Fix use-after-free: track TargetLibraryAnalysis in BasicAAResult invalidation (#183852)
`BasicAAResult` holds a reference to `TargetLibraryInfo` but its
`invalidate()` function did not check `TargetLibraryAnalysis`. When the
pass manager destroyed and re-created `TLI` (e.g. during `CGSCC`
invalidation or `FAM.clear()`), `BasicAAResult` survived with a dangling
`TLI` reference.
This was exposed by #157495 which added `aliasErrno()`, the first code
path that dereferences `TLI` from `BasicAAResult` during the `CGSCC`
pipeline, causing a AV when compiling Rust's core library on Arm64
Windows.
This change adds `TargetLibraryAnalysis` to the invalidation check so
`BasicAAResult` is properly invalidated when its `TLI` reference becomes
stale.
(cherry picked from commit 788625757ea4a7de562461dfea9b7a59b050ec91)
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