bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #17647] glibc: GCC 4.1


From: Samuel Thibault
Subject: Re: [bug #17647] glibc: GCC 4.1
Date: Mon, 20 Nov 2006 15:31:47 +0100
User-agent: Mutt/1.5.11

Thomas Schwinge, le Sun 19 Nov 2006 22:33:46 +0000, a écrit :
>   printf ("%s:fa[0] = %u\tfa[1] = %u\tra = %u\n", __func__, fa[0], fa[1],

> $ gcc-4.0 test.c && ./a.out
> main:fa = 3216472808    fa[1] = 3084724428      ra = 3084724428
> func:fa[0] = 3216472808 fa[1] = 134513645       ra = 134513645
> #v-
> 
> This is what I would expect.

Mmm, only by chance: don't expect fa[0], fa[1], ... to give you useful
information, only the _value_ of the pointer returned by
__builtin_frame_address() really makes sense. But

> #v+
> main:fa = 3220364948    fa[1] = 3220365064      ra = 3085416652
> func:fa[0] = 3220364952 fa[1] = 134513639       ra = 134513639
> #v-

Yes, looking at asm shows

 80483bf:       8d 45 fc                lea    0xfffffffc(%ebp),%eax

for the call to __builtin_frame_address(0) in main(), which seems odd to
me.

Samuel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]