[all-commits] [llvm/llvm-project] b40c1d: [LLVM] Fix use-after-free in AlwaysInliner flatten...

Grigory Pastukhov via All-commits all-commits at lists.llvm.org
Tue Apr 28 10:35:51 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b40c1d511b2e84842707939a1332b90ebb1a50a0
      https://github.com/llvm/llvm-project/commit/b40c1d511b2e84842707939a1332b90ebb1a50a0
  Author: Grigory Pastukhov <gpastukhov at meta.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M llvm/lib/Transforms/IPO/AlwaysInliner.cpp
    M llvm/test/Transforms/Inline/flatten.ll

  Log Message:
  -----------
  [LLVM] Fix use-after-free in AlwaysInliner flatten worklist (#194485)

Functions with both `alwaysinline` and `flatten` attributes were
collected into the `NeedFlattening` worklist, then erased during
always-inline processing, leaving dangling pointers. Fix by collecting
flatten functions after the always-inline loop, and eliminate the
separate worklist by iterating the module directly.



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