[all-commits] [llvm/llvm-project] 1e81e8: [IR] Avoid UB in `SymbolTableListTraits` (#139096)

Yingwei Zheng via All-commits all-commits at lists.llvm.org
Thu May 29 23:11:22 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1e81e800508fbec5bdd394754e6005af536aa2f3
      https://github.com/llvm/llvm-project/commit/1e81e800508fbec5bdd394754e6005af536aa2f3
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2025-05-30 (Fri, 30 May 2025)

  Changed paths:
    M llvm/include/llvm/IR/BasicBlock.h
    M llvm/include/llvm/IR/Function.h
    M llvm/include/llvm/IR/Module.h
    M llvm/include/llvm/IR/SymbolTableListTraits.h

  Log Message:
  -----------
  [IR] Avoid UB in `SymbolTableListTraits` (#139096)

This patch fixes the "dereferencing null" UB. Unfortunately, C++ doesn't
provide an inverse operation for `p->*pmf`.
See also https://github.com/llvm/llvm-project/pull/130952.



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