<div dir="ltr">Hi,<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 29, 2014 at 9:24 PM, Jason Evans <span dir="ltr"><<a href="mailto:jasone@canonware.com" target="_blank">jasone@canonware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div class="im">On Jan 29, 2014, at 11:17 AM, İsmail Dönmez <<a href="mailto:ismail@donmez.ws" target="_blank">ismail@donmez.ws</a>> wrote:<br>
</div><div><div class="im"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 29, 2014 at 9:09 PM, Jason Evans <span dir="ltr"><<a href="mailto:jasone@canonware.com" target="_blank">jasone@canonware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Jan 29, 2014, at 4:28 AM, İsmail Dönmez <<a href="mailto:ismail@donmez.ws" target="_blank">ismail@donmez.ws</a>> wrote:<br>
> I have 2 new failures:<br>
><br>
> thd_start:test/unit/prof_accum.c:83: Failed assertion: (bt_count_prev+(i-i_prev)) <= (bt_count) --> 6 > 1: thd_start<br>
<br>
</div>I'm guessing that this is due to the compiler being especially intelligent regarding mutual recursion for alloc_[01](), and I just added noinline attributes for those functions:<br>
<br>
<a href="https://github.com/jemalloc/jemalloc/commit/526e4a59a2fe39e4f8bdf1ec0c0d2a5a557c3f62" target="_blank">https://github.com/jemalloc/jemalloc/commit/526e4a59a2fe39e4f8bdf1ec0c0d2a5a557c3f62</a><br>
<br>
However, if the compiler is being that smart, it may also be smart enough to do tail call optimization despite an attempt in the code to thwart optimization. It appears that the gcc flag to disable this is -fno-optimize-sibling-calls, but I'm reluctant to resort to that unless the noinline attribute fails to do the job.<br>
</blockquote><div><br></div><div>This one is still failing, also adding <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">-fno-optimize-sibling-calls to CFLAGS didn't fix it.</span></div></div>
</div></div></blockquote><div><br></div></div><div>Did <span style="font-family:arial,sans-serif;font-size:12.800000190734863px">-fno-optimize-sibling-calls make it through to the compilation commands? If not, try using EXTRA_CFLAGS instead. Assuming </span><span style="font-family:arial,sans-serif;font-size:13px">-fno-optimize-sibling-calls is actually getting used, I'm out of ideas as to how this is failing, and I may need to set up an equivalent environment to dig in further.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div></div></blockquote><div><br></div><div>Its there: CFLAGS : -O2 -fno-optimize-sibling-calls -std=gnu99 -fvisibility=hidden , just removing the -O2 fixes the problem. So its indeed an optimization problem, so how about compiling the tests with -O0 instead?</div>
<div><br></div><div>Regards.</div><div><br></div></div></div></div>