[all-commits] [llvm/llvm-project] 471a38: StackProtector: ensure protection does not interfe...

Tim Northover via All-commits all-commits at lists.llvm.org
Thu May 6 17:01:10 PDT 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 471a386a3d348e933d200e1cc01413aa655d508e
      https://github.com/llvm/llvm-project/commit/471a386a3d348e933d200e1cc01413aa655d508e
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/CodeGen/StackProtector.cpp
    A llvm/test/CodeGen/AArch64/stack-protector-musttail.ll
    A llvm/test/CodeGen/ARM/Windows/stack-protector-musttail.ll
    A llvm/test/CodeGen/X86/tailcc-ssp.ll

  Log Message:
  -----------
  StackProtector: ensure protection does not interfere with tail call frame.

The IR stack protector pass must insert stack checks before the call instead of
between it and the return.

Similarly, SDAG one should recognize that ADJCALLFRAME instructions could be
part of the terminal sequence of a tail call. In this case because such call
frames cannot be nested in LLVM the stack protection code must skip over the
whole sequence (or risk clobbering argument registers).

(cherry picked from commit 5e3d9fcc3a8802cea5b850a3ca40c515d916bf82)




More information about the All-commits mailing list