[llvm-bugs] [Bug 31003] New: StackProtector pass crashes when module compiled twice

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 12 23:10:29 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=31003

            Bug ID: 31003
           Summary: StackProtector pass crashes when module compiled twice
           Product: libraries
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: 1101.debian at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

StackProtector::InsertStackProtectors has the following code (simplified):

AllocaInstr *AI = nullptr;
if (HasPrologue == false) {
  CreatePrologue(AI);
}

AI->FooBar()

However, when the prologue already exists, then AI is not initialized, which
lead to a crash.

So far I managed to reproduce it only by compiling a module twice using ORC's
compiler with optimizations disabled.
But it should be clear that code has problem.

Problematic code was introduced with this commit:
https://github.com/llvm-mirror/llvm/commit/1a7750eecd21d052a69faa43cadefe3215d4f920

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161113/6ef375d3/attachment.html>


More information about the llvm-bugs mailing list