<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 9, 2020 at 9:26 PM Cyril Hrubis <<a href="mailto:chrubis@suse.cz">chrubis@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
> Also I would like to get rid of the -fno-optimize-sibling-calls in the<br>
> Makefile, this makes the test a bit fragile and less portable.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">I'm not very sure, let me think/check a while.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
/*<br>
* Returns negative number if stack grows down, possitive if stack grows up<br>
*/<br>
static int stack_dir(void)<br>
{<br>
intptr_t addr = addr_func();<br>
<br>
printf("%p %p\n", &addr, (void*)addr);<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">This method may be doable, but the second %p print (nil), I don't why.</div><br></div><div><div class="gmail_default" style="font-size:small"># ./test </div>0x3ffe70feb48 (nil)<br>418387128<br><div class="gmail_default" style="font-size:small"></div></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>