<html><head><base href="x-msg://351/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I assume you are referring to:</div><div><br></div><div><div>@article{boeh92,</div><div>author = "Hans-Juergen Boehm and David R. Chase",</div><div>title = "A Proposal for Garbage-Collector-Safe {C} Compilation",</div><div>journal = "Journal of C Language Translation",</div><div>mon = dec,</div><div>year = 1992,</div><div>pages = "126--141",</div><div>URL = {http://reality.sgi.com/employees/boehm_mti/papers/boecha.ps.gz}</div><div>}</div></div><div><br></div>So long as the stacks have a pointer to anywhere on the heap page on which the object lies then it will not get reclaimed by our collector.  I'd be surprised if gcc performs optimizations that break our collector.<div><div><br>
<br><div><div>On Nov 23, 2010, at 5:44 AM, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">so.."the literate" (actually posts to usenet<br>by people who worked on Modula-3 compilers!)<br>warns about the following sort of thing:<br><br>void F1(char* a, char* b)<br>{<br> int c;<br> for (c = 10; c < 20; ++c)<br> {<br>   a[c] = b[c];<br> }<br>}<br><br>getting transformed into something like:<br><br>void F1(char* a, char* b)<br>{<br> int c;<br> a += 10;<br> b += 10;<br> for (c = 0; c < 10; ++c)<br> {<br>   a[c] = a[c];<br> }<br>}<br><br><br>actually it warns about something trickier, but this<br>is the best I can come up with that I understand,<br>off the top of my head.<br><br><br> => "interior pointers"<br> => "no gc roots in registers or on stack"<br> <br> <br>Should we be concerned?<br>Does our GC handle this?<br><br><br>Should we, like, mark all stores volatile but not all loads?<br>And maybe all parameters???<br>  And maybe copy them into non-volatile locals?<br> <span class="Apple-converted-space"> </span><br>The trickier warning is something where<br>the difference of the array bases is what is in registers, not merely an interior pointer.<br>I searched a while but couldn't find it.<br>It is probably by David Chase.<br><br> - Jay<br><br><br><br><br><br></div></blockquote></div><br></div></div></body></html>