[all-commits] [llvm/llvm-project] 095995: [LowerTypeTests] Avoid null dereference on invalid...

Arda Serdar Pektezol via All-commits all-commits at lists.llvm.org
Wed Jul 15 12:54:35 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09599503b1314a0394e57adbd6279d9a220bfdb8
      https://github.com/llvm/llvm-project/commit/09599503b1314a0394e57adbd6279d9a220bfdb8
  Author: Arda Serdar Pektezol <arda at pektezol.dev>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/IPO/LowerTypeTests.cpp
    A llvm/test/Transforms/LowerTypeTests/icall-branch-funnel-invalid-operand.ll

  Log Message:
  -----------
  [LowerTypeTests] Avoid null dereference on invalid branch funnel operand (#204951)

On the linked issue, a null dereference happens when looping over`
ArrayRef<GlobalTypeMember *> Globals` at
`LowerTypeTestsModule::buildBitSetsFromDisjointSet()`. This stems from
the external globals in the IR which don't enter GlobalTypeMembers.
Following that, operator[] over the DenseMap returns null and it
propagates to the looped over GlobalTypeMember.

Prevent the null dereference via `.find()` and reporting fatal usage
error if it is not present. Add a negative regression test.

Additionally, the LangRef for the `@llvm.icall.branch.funnel` intrinsic
is missing (see #133635). It would also be nice to have a Verifier entry
for this intrinsic, and get rid of most report_fatal_error() in this
file since it's deprecated.

Fixes #191985

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>



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