This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug malloc/22226] valgrind issues with static binaries


https://sourceware.org/bugzilla/show_bug.cgi?id=22226

--- Comment #5 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Markus Trippelsdorf from comment #3)
> (gdb) b malloc.c:3661
> Breakpoint 1 at 0x41bc27: malloc.c:3661. (2 locations)
> (gdb) run
> Starting program: /home/markus/glibc/a.out 
> 
> Breakpoint 1, _int_malloc (bytes=576, av=0x49e7a0 <main_arena>) at
> malloc.c:3661
> 3661      if (tcache && tc_idx < mp_.tcache_bins)
> (gdb) p tcache
> Cannot find thread-local storage for process 10095, executable file
> /home/markus/glibc/a.out:
> Cannot find thread-local variables on this target

Why can't gdb find the thread-local storage for the static binary?

We have already initialized TLS in csu/libc-start.c:195 by calling
__libc_setup_tls(), and so the tcache variable should be initialized.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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