Ramkumar Ramachandra
2015-May-19 14:19 UTC
[LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
Hi, We are seeing sporadic crashes since we migrated to MCJIT on Win64. The same tests pass without issues on Mac64 and Linux64. The issue is this assertion failure in RuntimeDyldELF.c: RealOffset <= INT32_MAX && RealOffset >= INT32_MIN I haven't managed to successfully catch the failure in Visual to try and debug it. Any tips on how to make progress? Oh, and we're on LLVM 3.5. Thanks. Ram -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150519/acb0edcb/attachment.html>
Reid Kleckner
2015-May-19 16:06 UTC
[LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
That sounds like a PC-relative relocation failure. Usually this happens when the relocation target is more than 2 GB away from the source. Try using the large code model or tweaking the memory manager. It turns out it's surprisingly hard to portably allocate some memory and then allocate some more within a 2 GB offset of the first allocation in a 64-bit process. For various reasons that I don't understand, reserving 2 GB of address space upfront and allocating from that is not workable for some MCJIT clients. On Tue, May 19, 2015 at 7:19 AM, Ramkumar Ramachandra <artagnon at gmail.com> wrote:> Hi, > > We are seeing sporadic crashes since we migrated to MCJIT on Win64. The > same tests pass without issues on Mac64 and Linux64. The issue is this > assertion failure in RuntimeDyldELF.c: > > RealOffset <= INT32_MAX && RealOffset >= INT32_MIN > > I haven't managed to successfully catch the failure in Visual to try and > debug it. Any tips on how to make progress? > > Oh, and we're on LLVM 3.5. > > Thanks. > > Ram > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150519/08445c4e/attachment.html>
Ramkumar Ramachandra
2015-May-22 21:10 UTC
[LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
So it appears that we get about half the crashes with the large code model. The rest are crashing in the same way. It could either mean that large code model still takes that crashing codepath and that the number of crashes only went down by chance, or that in one place in the flow, large code model is not matched to mean ELF::R_X86_64_PC64. I'm digging into this issue further, but any hints along the way would be appreciated. Thanks. Ram On Tue, May 19, 2015 at 12:06 PM, Reid Kleckner <rnk at google.com> wrote:> That sounds like a PC-relative relocation failure. Usually this happens > when the relocation target is more than 2 GB away from the source. Try > using the large code model or tweaking the memory manager. > > It turns out it's surprisingly hard to portably allocate some memory and > then allocate some more within a 2 GB offset of the first allocation in a > 64-bit process. For various reasons that I don't understand, reserving 2 GB > of address space upfront and allocating from that is not workable for some > MCJIT clients. > > On Tue, May 19, 2015 at 7:19 AM, Ramkumar Ramachandra <artagnon at gmail.com> > wrote: > >> Hi, >> >> We are seeing sporadic crashes since we migrated to MCJIT on Win64. The >> same tests pass without issues on Mac64 and Linux64. The issue is this >> assertion failure in RuntimeDyldELF.c: >> >> RealOffset <= INT32_MAX && RealOffset >= INT32_MIN >> >> I haven't managed to successfully catch the failure in Visual to try and >> debug it. Any tips on how to make progress? >> >> Oh, and we're on LLVM 3.5. >> >> Thanks. >> >> Ram >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150522/fbadc051/attachment.html>
Nicholas Chapman
2015-May-24 22:37 UTC
[LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
There was a crash on Windows when more than 4K is allocated on the stack at once, due to chkstk call offset being too large. Maybe you are seeing that. It's fixed in trunk, but not in any stable release. Nick C. On 19/05/2015 15:19, Ramkumar Ramachandra wrote:> Hi, > > We are seeing sporadic crashes since we migrated to MCJIT on Win64. > The same tests pass without issues on Mac64 and Linux64. The issue is > this assertion failure in RuntimeDyldELF.c: > > RealOffset <= INT32_MAX && RealOffset >= INT32_MIN > > I haven't managed to successfully catch the failure in Visual to try > and debug it. Any tips on how to make progress? > > Oh, and we're on LLVM 3.5. > > Thanks. > > Ram > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150524/deb86d93/attachment.html>
Apparently Analagous Threads
- [LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
- [LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
- [LLVMdev] Sporadic "RealOffset <= INT32_MAX && RealOffset >= INT32_MIN" failures with MCJIT on Windows
- [LLVMdev] How to test isDereferenceablePointer?
- [LLVMdev] [PATCH] .gitignore: add rules for a clean worktree