<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Looks good to me, with a couple nits:<div><br></div><div><div>+  virtual RecordingJITMemoryManager* CreateMemoryManager() {</div><div><br></div><div>The '*' should bind to the identifier, not the type. The function name should start with lower case. There's a few other instances in the patch of the former. Please double-check.</div><div><br></div><div>Thanks!</div><div><br></div><div>-Jim</div><div><br></div><div><br><div><div>On Jan 8, 2013, at 2:43 PM, Michael Muller <<a href="mailto:mmuller@google.com">mmuller@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">New patch attached, incorporates Misha's comments and current trunk.</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jan 4, 2013 at 7:44 PM, Misha Brukman <span dir="ltr"><<a href="mailto:brukman@gmail.com" target="_blank">brukman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wed, Dec 19, 2012 at 1:55 PM, Michael Muller <span dir="ltr"><<a href="mailto:mmuller@enduden.com" target="_blank">mmuller@enduden.com</a>></span> wrote:</div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


See <a href="http://llvm.org/bugs/show_bug.cgi?id=13678" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=13678</a> for more history.<br>
<br>
See also:<br>
  <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052766.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052766.html</a><br>
  <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/150422.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/150422.html</a><br>
  <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120917/150801.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120917/150801.html</a><br>
  <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056829.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-December/056829.html</a><br>
<br>
When you run out of space writing to a buffer, the buffer management code<br>
simply stops writing at the end of the buffer.  It is the responsibility of<br>
the caller to verify that it has stayed in bounds and perform a retry with<br>
a larger memory estimate if not.  The function writing code does this, but<br>
the exception table code following it does not.  The end result is that<br>
exception table pointers can get registered pointing to invalid data, causing<br>
seg-faults when an exception is thrown.<br></blockquote><div><br></div></div><div>Minor drive-by style comments (I wish there were a web UI for entering these in context):</div><div><ul><li>s/;;/;/</li><li>ASSERT_TRUE(actual == expected) --> ASSERT_EQ(expected, actual)</li>


<li>add space around binary operators (-, *, etc.), e.g.:</li></ul></div><div><pre style="word-wrap:break-word;white-space:pre-wrap">+      ActualSize = (CurBufferPtr-BufferBegin)*2;</pre></div></div></blockquote><div><br>
</div><div style="">I'm sure I copied that from somewhere, but looking at the file now I see nothing resembling such formatting.  Fixed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div><pre style="word-wrap:break-word;white-space:pre-wrap"></pre></div><div><ul><li>fix arg alignment of "ActualSize" here:</li></ul></div><div><pre style="word-wrap:break-word;white-space:pre-wrap">+    while (true) {
+      BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(),
+                                                              ActualSize);</pre></div></div></blockquote><div><br></div><div style="">Done.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">Misha</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Michael Muller<br>Ym9yZWQ/
</div></div>
<span><ExceptionTableOverflowFix-v5.patch></span></blockquote></div><br></div></div></body></html>