<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;}
span.EmailStyle17
{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">Yes, you are correct Yaron. Before we commit this we ought to put a check in to see what the target OS is. I just suggested the change below as a quick and
easy way to verify that this was the cause of the problem. I’ll clean it up.<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> Monday, October 14, 2013 9:09 PM<br>
<b>To:</b> Christian Schafmeister; Kaylor, Andrew; iain@codesourcery.com<br>
<b>Cc:</b> <llvmdev@cs.uiuc.edu><br>
<b>Subject:</b> Re: [LLVMdev] A weird, reproducable problem with MCJIT<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Correct or no I don't know, but this change will affect all x86-64 targets including Linux and Windows as getMaxStubSize() is called from the ELF linker as well as the Mach-O linker.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">2013/10/15 Christian Schafmeister <<a href="mailto:chris.schaf@verizon.net" target="_blank">chris.schaf@verizon.net</a>><o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
With the help of <a href="mailto:iain@codesourcery.com">iain@codesourcery.com</a> and
<a href="mailto:andrew.kaylor@intel.com">andrew.kaylor@intel.com</a> we<br>
tracked the problem down to a bad relocation that was clobbering the<br>
first bytes of the eh_frame. I think this problem/solution may be OS X<br>
specific.<br>
<br>
On akaylor's suggestion I made the change below and my reproducable test<br>
case now compiles fine with MCJIT.<br>
<br>
As well, my Common Lisp code base now compiles using MCJIT - that's about 1,000<br>
functions at one MCJIT module per function.<br>
<br>
<br>
<br>
In llvm/lib/ExecutionEngine/RuntimeDyld<br>
<br>
Index: RuntimeDyldImpl.h<br>
===================================================================<br>
--- RuntimeDyldImpl.h (revision 192535)<br>
+++ RuntimeDyldImpl.h (working copy)<br>
@@ -195,7 +195,7 @@<br>
else if (Arch == Triple::ppc64 || Arch == Triple::ppc64le)<br>
return 44;<br>
else if (Arch == Triple::x86_64)<br>
- return 6; // 2-byte jmp instruction + 32-bit relative address<br>
+ return 8; /* was 6 but akaylor said change to 8 - meister Oct 2013 */ // 2-byte jmp instruction + 32-bit relative address<br>
else if (Arch == Triple::systemz)<br>
return 16;<br>
else<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">
http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>