[llvm-bugs] [Bug 45345] New: Bad codegen: funclet Prologue and Epilogue do not agree on frame size.

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 29 09:29:37 PDT 2020


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

            Bug ID: 45345
           Summary: Bad codegen: funclet Prologue and Epilogue do not
                    agree on frame size.
           Product: libraries
           Version: 9.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: AArch64
          Assignee: unassignedbugs at nondot.org
          Reporter: Daniel.Frampton at microsoft.com
                CC: arnaud.degrandmaison at arm.com,
                    llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

Created attachment 23288
  --> https://bugs.llvm.org/attachment.cgi?id=23288&action=edit
Program that will crash if compiled and run on aarch64-pc-windows-msvc

The generated code for a funclet can have an add to sp in the epilogue for
which there is no corresponding sub in the prologue.

To trigger this case we must be generating a funclet and:

1) The function must make a call where arguments are passed on the stack (these
are the extra bytes the epilog adds).

2) We must not be able to combine the stack adjustment into a single sub to sp
when saving callee-save registers, which will happen if we have an aligned
object or are using alloca.

Attaching simple C++ repro.

Bug exists in both LLVM9 and master.

-- 
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/20200329/feece4bb/attachment-0001.html>


More information about the llvm-bugs mailing list