<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><div><div class="h5"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
</blockquote>
<div><br>
</div>
<div>So, i instrumented llvm to add runtime asserts about
the noaliasing pointers before free (IE it adds an assert
that, for each pointer that is noaliased with the pointer
passed to free, free is not destroying that pointer), and
it fails really quickly.</div>
</div>
</div>
</div>
</blockquote>
<br></div></div>
Are these live pointers? (i.e., could this be caused because malloc
is recycling memory blocks?)<span class=""><br>
<br></span></div></blockquote><div><br>I only stared at a few of them, and they looked live.</div><div>They weren't already freed/reused.</div><div> </div><div>I stopped looking because, well, nothing has broken so far and while this was a fun digression, fixing any of this isn't going to be at the top of my list soon.</div><div>I'm only going to complain for so long if i'm not going to go and fix it ;)</div><div><br></div><div>I feel like i have enough "things that bother me" to fix for the moment :)</div><div><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
<div>Hence, i'm going to go with "i still have trouble
believing we are generating currently correct code that
accounts for this model".</div>
<div>Though i admit nothing currently takes advantage of
free that i can find.<br>
</div>
<div>But at least i feel like i understand what we are
trying to model :)</div>
</div>
</div>
</div>
</blockquote>
<br></span>
Sounds good. ;)<br>
<br>
We should be a bit careful, however. Or, at least I should ;) -- I'd
like to get back to doing heap-to-stack conversion at some point.<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></div></blockquote><div><br></div><div>I somehow would guess when we start stressing the memory model this particular issue may be the least of our worries :)<br><br></div></div></div></div>