[PATCH] D138774: Enhance stack protector

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 23:30:31 PST 2022


uabelho added a comment.

Hello,

I noticed that if the compiler is built with EXPENSIVE_CHECKS on, the stack-protector-no-return.ll testcase fails with

  DominatorTree is different than a freshly computed one!
  	Current:
  =============================--------------------------------
  Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
    [1] %entry {4294967295,4294967295} [0]
      [2] %unreachable {4294967295,4294967295} [1]
      [2] %lpad {4294967295,4294967295} [1]
        [3] %invoke.cont {4294967295,4294967295} [2]
          [4] %invoke.cont2 {4294967295,4294967295} [3]
          [4] %SP_return3 {4294967295,4294967295} [3]
          [4] %CallStackCheckFailBlk2 {4294967295,4294967295} [3]
        [3] %lpad1 {4294967295,4294967295} [2]
          [4] %eh.resume {4294967295,4294967295} [3]
            [5] %SP_return6 {4294967295,4294967295} [4]
            [5] %CallStackCheckFailBlk5 {4294967295,4294967295} [4]
          [4] %terminate.lpad {4294967295,4294967295} [3]
            [5] %SP_return9 {4294967295,4294967295} [4]
            [5] %CallStackCheckFailBlk8 {4294967295,4294967295} [4]
      [2] %SP_return {4294967295,4294967295} [1]
      [2] %CallStackCheckFailBlk {4294967295,4294967295} [1]
  Roots: %entry 
  
  	Freshly computed tree:
  =============================--------------------------------
  Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
    [1] %entry {4294967295,4294967295} [0]
      [2] %SP_return {4294967295,4294967295} [1]
        [3] %unreachable {4294967295,4294967295} [2]
        [3] %lpad {4294967295,4294967295} [2]
          [4] %invoke.cont {4294967295,4294967295} [3]
            [5] %SP_return3 {4294967295,4294967295} [4]
              [6] %invoke.cont2 {4294967295,4294967295} [5]
            [5] %CallStackCheckFailBlk2 {4294967295,4294967295} [4]
          [4] %lpad1 {4294967295,4294967295} [3]
            [5] %eh.resume {4294967295,4294967295} [4]
              [6] %SP_return6 {4294967295,4294967295} [5]
              [6] %CallStackCheckFailBlk5 {4294967295,4294967295} [5]
            [5] %terminate.lpad {4294967295,4294967295} [4]
              [6] %SP_return9 {4294967295,4294967295} [5]
              [6] %CallStackCheckFailBlk8 {4294967295,4294967295} [5]
      [2] %CallStackCheckFailBlk {4294967295,4294967295} [1]
  Roots: %entry 

This can also be reproduced on a non-EXPENSIVE_CHECKS build just by adding "-verify-dom-info" to the command line like

  llc test/CodeGen/X86/stack-protector-no-return.ll -mtriple=x86_64-unknown-linux-gnu -o - -verify-dom-info


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138774/new/

https://reviews.llvm.org/D138774



More information about the llvm-commits mailing list