[LLVMbugs] [Bug 18582] New: Offset overflow on calling __chkstc and __alloca on x64

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 22 10:33:33 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18582

            Bug ID: 18582
           Summary: Offset overflow on calling __chkstc and __alloca on
                    x64
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikhaill at microsoft.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

We are trying to use MCJIT, and ran into x64 codegen problem when required
stack frame is more than 4K.
In this case, the system attempts to call __chkstk to probe the stack.
This attempt results in assertion in RuntimeDyldELF::resolveX86_64Relocation(),
case ELF::R_X86_64_PC32, because the RealOffset does not fit in 32 bits.

Same happens with __alloca, created via IRBuilder::CreateAlloca in a
conditional block, rather than at the beginning of a JITed function.

Perhaps the issue can be fixed by using indirect call via 64-bit register or
replicating service routines inside jitted block.

-- 
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/20140122/2d97ea8e/attachment.html>


More information about the llvm-bugs mailing list