<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">So it looks like 0x0A3600D1 is a good code address and there’s no problem executing the code there, but 0x00BC7680 is a bad data address.  Is that correct?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If so, this is almost certainly a relocation problem.  You just need to find a relocation that writes an entry (probably a relative offset) at 0x0A3600D1+the
 size of the instruction at that address.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">BTW, what I said before about not being aware of any size limitations wasn’t quite correct.  If you have enough code and data that we end up putting sections
 at addresses that are more than 2GB apart we’ll have problems, but you should see an assertion in that case.  That can happen if we weren’t able to get the address we requested from allocateMappedMemory, but it doesn’t look like that’s what’s happening here.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Andy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Yaron Keren [mailto:yaron.keren@gmail.com]
<br>
<b>Sent:</b> Tuesday, October 22, 2013 1:41 PM<br>
<b>To:</b> Kaylor, Andrew<br>
<b>Cc:</b> <llvmdev@cs.uiuc.edu><br>
<b>Subject:</b> Re: Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your ideas.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Memory allocation already exceeds 2x64K in the "working" case so it's not the condition of allocating more than 64K. To be sure I had modified SectionMemoryManager::allocateSection to allocate four time the required memory but it did not
 trigger more crashes.I debugged through the allocation code including the Win32 code and it seems to work well. I have also tried disabling the MemGroup.FreeMem cache which did not matter.<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">An added assert for no Stubs to the end of RuntimeDyldImpl::loadObject<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">      processRelocationRef(SectionID, *i, *obj, LocalSections, LocalSymbols,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">                Stubs);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">      assert(!Stubs.size());</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">indeed caught nothing = no stubs created.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Disabling (de)registerEH did not help.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Looking at relocations and sections printouts, the exception is:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">Unhandled exception at 0x0A3600D1 :</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">0xC0000005: Access violation writing location 0x00BC7680.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">which is right after the start of .text:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">emitSection SectionID: 1 Name: .text obj addr: 0A3F1350 new addr: 0A360000 DataSize: 253203 StubBufSize: 0 Allocate: 253203</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">...</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">Resolving relocations Section #1        0A360000</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">so at least it is running code but tries to write a wrong location.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Another run exhibits similar crash, still in .text but somewhat later.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I have checked and the function address I'm running is located in .text towards the end, as expected since it's the last function added to the Module.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Also I speculated that if it crashes when .text crosses 128K but no, it happens when it's larger.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I had attached gdb to the process hoping it will show more information but it showed even less information than the Visual C++ debugger.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Out of ideas... <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Yaron<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">2013/10/22 Kaylor, Andrew <<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>><o:p></o:p></p>
</div>
<blockquote style="border-top:none;border-left:solid #CCCCCC 1.0pt;border-bottom:none;border-right:solid #CCCCCC 1.0pt;padding:0in 6.0pt 0in 6.0pt;margin-left:4.8pt;margin-right:4.8pt">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I would guess that it’s crashing somewhere in the generated code.  On Windows we don’t have a way
 to get call stacks to the generated code (though if you want to try it on Linux, that should work).  You can probably look at the address where the crash is occurring and verify that it is in the generated code.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">There are a couple of things I would look for.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">First, I’d take a look at the SectionMemoryManager allocation handling.  The fact that the problem
 is code size dependent strongly points in this direction.  It may be that SectionMemoryManager does something wrong when it hits a page boundary or something.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Second, I’d look at the relocation processing.  If it is generating any stubs, that would be a potential
 problem spot, but it shouldn’t be generating any stubs.  So the obvious thing to look at is whether any of the relocations are writing to the spot where the crash occurs.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">-Andy</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Yaron Keren [mailto:<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, October 22, 2013 10:17 AM<br>
<b>To:</b> Kaylor, Andrew<br>
<b>Cc:</b> <<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>><br>
<b>Subject:</b> Re: Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">OS is Windows 7 64 bit OS, compiler is 32 bit Visual C++ 2012 with 32 bit.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The target which is i686-pc-mingw32-elf so I can use the ELF dynamic loader. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Code model, relocation model and and memory manager are whatever default for this - did not modify.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The Module comes from clang. The source is 1000 or more lines repeating C++ code in one big function:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  A+1;</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  A*B.t();</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">where A and B are matrices from Armadillo <a href="http://arma.sourceforge.net/" target="_blank">http://arma.sourceforge.net/</a>. This a stress and performance test due to the
 large number of EH and temporary objects created.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I am using the Engine Builder and MCJIT unmodified (except the multi-modules patches which are not relevant as there is only one module) like this:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  OwningPtr<llvm::ExecutionEngine> EE(llvm::EngineBuilder(M)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">                                          .setErrorStr(&Error)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">                                          .setUseMCJIT(true)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">                                          .create());</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">to run the function either <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  llvm::Function *F = M->getFunction(Name);</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  void *FN = EE->getPointerToFunction(F);</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">or<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  uint64_t FN = EE->getFunctionAddress(Name);</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">followed by <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New""> ((void (*)())FN)();</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">or<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-family:"Courier New"">  EE->runFunction(F, std::vector<llvm::GenericValue>());</span><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">all work the same with smaller about 1000 lines of the above code module and crash the same with more code. The call stack is unhelpful Visual C++ says: Frames below may be incorrect
 and/or missing which indicates a real problem with it. I have tried to provide less stack space (default is 10M) for the compiled program without any change.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Yaron<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;margin-bottom:12.0pt;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR"> <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2013/10/22 Kaylor, Andrew <<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>><span lang="AR-SA" dir="RTL"><o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m not aware of such a limitation</span><span dir="RTL"></span><span lang="AR-SA" style="font-size:11.0pt;color:#1F497D"><span dir="RTL"></span>.</span><span dir="LTR"><o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="RTL"></span><span lang="AR-SA" style="font-size:11.0pt;color:#1F497D"><span dir="RTL"></span> </span><span lang="AR-SA"><o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What architecture, code model and relocation model are you using</span><span dir="RTL"></span><span lang="AR-SA" style="font-size:11.0pt;color:#1F497D"><span dir="RTL"></span>? 
</span><span dir="LTR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Are you using the SectionMemoryManager</span><span dir="RTL"></span><span lang="AR-SA" style="font-size:11.0pt;color:#1F497D"><span dir="RTL"></span>?</span><span lang="AR-SA"><o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA" style="font-size:11.0pt;color:#1F497D"> </span><span lang="AR-SA"><o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA" style="font-size:11.0pt;color:#1F497D">-</span><span dir="LTR" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Andy</span><span lang="AR-SA"><o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA" style="font-size:11.0pt;color:#1F497D"> </span><span lang="AR-SA"><o:p></o:p></span></p>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<b><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><span dir="RTL"></span>:</span></b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
</span><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Yaron Keren [mailto</span><span dir="RTL"></span><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><span dir="RTL"></span>:<a href="mailto:yaron.keren@gmail.com" target="_blank"><span lang="EN-US" dir="LTR">yaron.keren@gmail.com</span></a><span dir="RTL"></span><span dir="RTL"></span>]
<br>
</span><b><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Sent</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><span dir="RTL"></span>:</span></b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
</span><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Tuesday, October 22, 2013 8:12 AM</span><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
</span><b><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">To</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><span dir="RTL"></span>:</span></b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
 <<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank"><span lang="EN-US" dir="LTR">llvmdev@cs.uiuc.edu</span></a><span dir="RTL"></span><span dir="RTL"></span>>;
</span><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Kaylor, Andrew</span><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
</span><b><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Subject</span></b><span dir="RTL"></span><b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><span dir="RTL"></span>:</span></b><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
</span><span dir="LTR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen</span><span dir="RTL"></span><span lang="AR-SA" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><span dir="RTL"></span>?</span><span lang="AR-SA"><o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA"> <o:p></o:p></span></p>
<div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR">I'm running in MCJIT a module generated from one C</span><span dir="RTL"></span><span lang="AR-SA"><span dir="RTL"></span>++
</span><span dir="LTR">function. Every line of the source function uses C</span><span dir="RTL"></span><span lang="AR-SA"><span dir="RTL"></span>++
</span><span dir="LTR">classes and may throw an exception. As long as there are less than (about) 1000 lines, everything works. With more lines the compiled</span><span dir="RTL"></span><span dir="RTL"></span>
<span dir="LTR">code crashes when running it, with no sensible stack trace</span><span dir="RTL"></span><span lang="AR-SA"><span dir="RTL"></span>.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR">Is there any kind of hard-coded size limitation in</span><span dir="RTL"></span><span lang="AR-SA"><span dir="RTL"></span> </span><span dir="LTR">MCJIT / ELF Dynamic Linker / ELF codegen / number of EH states in a function</span><span dir="RTL"></span><span lang="AR-SA"><span dir="RTL"></span>
 ? <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR">I did browse the code but could not find anything obvious</span><span dir="RTL"></span><span lang="AR-SA"><span dir="RTL"></span>. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span dir="LTR">Yaron</span><span lang="AR-SA"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA"> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" dir="RTL" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-align:right;direction:rtl;unicode-bidi:embed">
<span lang="AR-SA"> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><span lang="AR-SA" dir="RTL"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>