<div class="gmail_quote">On Mon, Feb 1, 2010 at 3:41 PM, Jeffrey Yasskin <span dir="ltr"><<a href="mailto:jyasskin@google.com">jyasskin@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hm, I wonder if the error message for llvm_unreachable should change.<br>
I think I remember a couple people focusing incorrectly on the<br>
UNREACHABLE instead of the actual error message above it (which means<br>
it's our fault, not theirs).<br></blockquote><div><br>I think so. It really seems like it's the programmers fault <br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Miranda, this is pointing at the same problem you had before. You have<br>
a function JIT-compiled, and you're trying to RAUW<br>
(ReplaceAllUsesWith) it. You'll need to call<br>
freeMachineCodeForFunction(x) before you call<br>
x->replaceAllUsesWith(y).<br></blockquote><div><br>Actually, I didn't call freeMachineCodeForFunction(x) (I know it's a leak, but just to show it's possible not to call).<br></div><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


And yes, putting your code (and a gdb-produced stack trace when<br>
there's a crash) somewhere we can see it (for example, <a href="http://pastebin.com" target="_blank">pastebin.com</a>)<br>
will always help us debug problems.<br></blockquote><div><br>The headers are a little mess, but it compiles OK.<br>Main file: <a href="http://miranda.pastebin.com/m10213c9c">http://miranda.pastebin.com/m10213c9c</a><br>File with function A (following your convention): <a href="http://miranda.pastebin.com/m2dbe2e64">http://miranda.pastebin.com/m2dbe2e64</a><br>

File with function B: <a href="http://miranda.pastebin.com/m2dbe2e64">http://miranda.pastebin.com/m2dbe2e64</a><br>File with function C: <a href="http://miranda.pastebin.com/m32f19219">http://miranda.pastebin.com/m32f19219</a><br>

gdb trace: <a href="http://miranda.pastebin.com/m5c794b0d">http://miranda.pastebin.com/m5c794b0d</a><br><br>When I call recompileAndRelinkFunction without calling freeMachineCodeForFunction for the same function, it crashes.<br>

<br>Just ask if more info is needed.<br><br><br> </div></div><br>