[all-commits] [llvm/llvm-project] cfadf3: [TableGen] Fix a potential crash when operand does...

Shilei Tian via All-commits all-commits at lists.llvm.org
Thu Apr 4 17:29:48 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfadf3f62230505c1156e07f46c06813271bb5ac
      https://github.com/llvm/llvm-project/commit/cfadf3f62230505c1156e07f46c06813271bb5ac
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2024-04-04 (Thu, 04 Apr 2024)

  Changed paths:
    M llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp

  Log Message:
  -----------
  [TableGen] Fix a potential crash when operand doesn't appear in the instruction pattern (#87663)

We have a check of whether an operand is in the instruction pattern, and
emit an
error if it is not, but we simply continue execution, including directly
dereferencing a point-like object `InVal`, which will be just created
when
accessing the map. It contains a `nullptr` so dereferencing it causes
crash.
This is a very trivial fix.



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