[LTP] LTP release

Li Wang
2020-09-10T09:22:48Z

On Thu, Sep 10, 2020 at 3:19 PM Li Wang <liwang@redhat.com> wrote:

>
>
> On Wed, Sep 9, 2020 at 9:26 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
>> Hi!
>> > Also I would like to get rid of the -fno-optimize-sibling-calls in the
>> > Makefile, this makes the test a bit fragile and less portable.
>>
>
> I'm not very sure, let me think/check a while.
>

From the document, it could also help prevents optimization purposes.
I think we can have a try, if no more issues, that will be great.

>
>
>> /*
>> * Returns negative number if stack grows down, possitive if stack grows
>> up
>> */
>> static int stack_dir(void)
>> {
>> intptr_t addr = addr_func();
>>
>> printf("%p %p\n", &addr, (void*)addr);
>>
>
> This method may be doable, but the second %p print (nil), I don't why.
>

The reason seems that the local variable is revoked after the function
is calling, so we get NULL of the local variable address. It works as we
expected when introducing a global pointer to save and return the '&a'.

--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200910/74f43ed2/attachment-0001.htm>