This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems on glibc UTRACE


On 11/24/2014 07:39 AM, David Smith wrote:
> So, I ran your test program and script and got similar results. So, I
> ran gdb on the test program. Here's what I get:
> 
> ====
> Breakpoint 1, main () at testprog.c:10
> 10	  ptr = malloc(10);
> (gdb) s
> __GI___libc_malloc (bytes=140737488347248) at malloc.c:2845
> =====
> 
> Here are my breakpoints:
> 
> =====
> (gdb) info b
> Num     Type           Disp Enb Address            What
> 1       breakpoint     keep y   0x00000000004005dd in main at testprog.c:10
> 	breakpoint already hit 1 time
> 2       breakpoint     keep y   0x0000003ff7a7fca9 in __GI___libc_malloc
>                                                    at malloc.c:2849
> 	breakpoint already hit 2 times
> ====
> 
> Also note that the 2nd breakpoint gets hit twice.
> 
> So, since gdb and systemtap agree here, I think systemtap is operating
> correctly.
> 
> Now, as to where the odd bytes value is coming from and why malloc is
> getting called twice, I don't really know. Perhaps some glibc oddity?
> glibc does some odd things with function wrappers, hooks, etc.

I don't know about getting called twice, but the odd value may be this:
https://bugzilla.redhat.com/show_bug.cgi?id=1151226

If so, stap -P ought to help by forcing a prologue search.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]