[all-commits] [llvm/llvm-project] 7c6c03: [NFC] Fix possibly deref nullptr

XinWang10 via All-commits all-commits at lists.llvm.org
Wed Aug 16 18:44:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c6c03ea71106c671f82eedf32f15c7d23af2f40
      https://github.com/llvm/llvm-project/commit/7c6c03ea71106c671f82eedf32f15c7d23af2f40
  Author: XinWang10 <xin10.wang at intel.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/Target/X86/X86LowerAMXType.cpp

  Log Message:
  -----------
  [NFC] Fix possibly deref nullptr

1. In X86LowerAMXType.cpp dyn_cast could lead to UserI be nullptr which coud be dref in IRBuilder constructor.
2. In AsmPrinter.cpp, doInitialization could make MMI be nullptr if MMIWP->getMMI() is false, then the deref after could be unexpected.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D157948




More information about the All-commits mailing list