[all-commits] [llvm/llvm-project] df6fb4: [llvm] Add assertions for the smart pointers with ...

avl-llvm via All-commits all-commits at lists.llvm.org
Sat Feb 27 03:32:33 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df6fb4d392e530fbf9d4e331711c500d47980dcc
      https://github.com/llvm/llvm-project/commit/df6fb4d392e530fbf9d4e331711c500d47980dcc
  Author: Ella Ma <alansnape3058 at gmail.com>
  Date:   2021-02-27 (Sat, 27 Feb 2021)

  Changed paths:
    M llvm/lib/DWARFLinker/DWARFLinker.cpp

  Log Message:
  -----------
  [llvm] Add assertions for the smart pointers with the possibility to be null in DWARFLinker::loadClangModule

Split from D91844.

The local variable `Unit` in function `DWARFLinker::loadClangModule`
in file `llvm/lib/DWARFLinker/DWARFLinker.cpp`. If the variable is not set
in the loop below its definition, it will trigger a null pointer dereference
after the loop.

Patch By: OikawaKirie

Reviewed By: avl

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




More information about the All-commits mailing list