[all-commits] [llvm/llvm-project] 8c0500: [X86] Fix a nullptr dereference in X86Subtarget::c...

topperc via All-commits all-commits at lists.llvm.org
Thu May 28 17:23:25 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8c050070fb96b4e6b8608a120d102bac0c8ada1c
      https://github.com/llvm/llvm-project/commit/8c050070fb96b4e6b8608a120d102bac0c8ada1c
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-05-28 (Thu, 28 May 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86Subtarget.cpp
    M llvm/test/CodeGen/X86/code-model-elf.ll

  Log Message:
  -----------
  [X86] Fix a nullptr dereference in X86Subtarget::classifyLocalReference when compiling with -mcmodel=medium -fpic and using a constant pool

LowerConstantPool passes a nullptr into classifyLocalReference. The medium code model handling for PIC will try to deference it using isa. This patch switches to isa_and_nonnull.

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




More information about the All-commits mailing list