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

Bug#273051: libc6: Memory leak in getpwuid, getgrouplist still reproducible in glibc 2.3.5-12



tag 273051 - unreproducible
thanks

  I confirm that, though it seems to be an x86 only bug, as it works on
amd64 OK.

On Thu, Feb 09, 2006 at 01:26:46PM +0200, Torok Edwin wrote:
> Package: libc6
> Version: 2.3.5-12.1
> Followup-For: Bug #273051
> 
> 
> This bug is still reproducible. There still is a memory leak in
> nss_parse_service_list when using getpwuid, getgrouplist. I have found
> that this leak appears when I use getpwnam_r too. (I attached the
> getpwnam.c test program).
> 
> However if I change 'compat' to 'files' in /etc/nsswitch.conf the leaks
> go away. 
> 
> Default nsswitch.conf (leak when used):
> # /etc/nsswitch.conf
> #
> # Example configuration of GNU Name Service Switch functionality.
> # If you have the `glibc-doc' and `info' packages installed, try:
> # `info libc "Name Service Switch"' for information about this file.
> 
> passwd:         compat
> group:          compat
> shadow:         compat
> 
> #passwd:         files
> #group:          files
> #shadow:         files
> 
> hosts:          files dns mdns
> networks:       files
> 
> protocols:      db files
> services:       db files
> ethers:         db files
> rpc:            db files
> 
> netgroup:       nis
> 
> Modified /etc/nsswitch.conf:
> # /etc/nsswitch.conf
> #
> # Example configuration of GNU Name Service Switch functionality.
> # If you have the `glibc-doc' and `info' packages installed, try:
> # `info libc "Name Service Switch"' for information about this file.
> 
> #passwd:         compat
> #group:          compat
> #shadow:         compat
> 
> passwd:         files
> group:          files
> shadow:         files
> 
> hosts:          files dns mdns
> networks:       files
> 
> protocols:      db files
> services:       db files
> ethers:         db files
> rpc:            db files
> 
> netgroup:       nis
> 
> 
> I compiled the programs like this:
> $ gcc -g getpwuid.c -o getpwuid
> $ gcc -g getgrouplist.c -o getgrouplist
> $ gcc -g getpwnam.c -o getpwnam
> 
> I run valgrind like this, using default /etc/nsswitch.conf:
> $ valgrind --tool=memcheck -v --leak-resolution=high --leak-check=yes --num-callers=15 --log-file=pwuid.log ./getpwuid
> $ valgrind --tool=memcheck -v --leak-resolution=high --leak-check=yes --num-callers=15 --log-file=pwnam.log ./getpwnam
> $ valgrind --tool=memcheck -v --leak-resolution=high --leak-check=yes --num-callers=15 --log-file=grouplist.log ./getgrouplist
> Memory leaks in this case.
> 
> I changed 'compat' to 'files' in /etc/nsswitch.conf, and run:
> $ valgrind --tool=memcheck -v --leak-resolution=high --leak-check=yes --num-callers=15 --log-file=grouplist.log_ok ./getgrouplist
> No leak in this case.
> 
> I attached the full output logs to this bug report, but here are the
> relevant parts:
> 
> ==11536== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely
> lost in loss record 11 of 11
> ==11536==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11536==    by 0x4BFB2CF: nss_parse_service_list (nsswitch.c:530)
> ==11536==    by 0x4BFB9C7: __nss_database_lookup (nsswitch.c:134)
> ==11536==    by 0x4E5F5DF: ???
> ==11536==    by 0x4E601E3: ???
> ==11536==    by 0x4BB1675: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:207)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> 
> ==11542== 340 (52 direct, 288 indirect) bytes in 1 blocks are definitely
> lost in loss record 13 of 13
> ==11542==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11542==    by 0x4BFB2CF: nss_parse_service_list (nsswitch.c:530)
> ==11542==    by 0x4BFB9C7: __nss_database_lookup (nsswitch.c:134)
> ==11542==    by 0x4E63213: ???
> ==11542==    by 0x4BAF35B: internal_getgrouplist (initgroups.c:104)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> 
> ==11539== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely
> lost in loss record 11 of 11
> ==11539==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11539==    by 0x4BFB2CF: nss_parse_service_list (nsswitch.c:530)
> ==11539==    by 0x4BFB9C7: __nss_database_lookup (nsswitch.c:134)
> ==11539==    by 0x4E5F5DF: ???
> ==11539==    by 0x4E60C9B: ???
> ==11539==    by 0x4BB1485: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:207)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> 
> 
> ==11978== malloc/free: in use at exit: 0 bytes in 0 blocks.
> ==11978== malloc/free: 46 allocs, 46 frees, 4,094 bytes allocated.
> 
> Version of gcc:
> Using built-in specs.
> Target: x86_64-linux-gnu
> Configured with: ../src/configure -v
> --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
> --enable-shared --with-system-zlib --libexecdir=/usr/lib
> --without-included-gettext --enable-threads=posix --enable-nls
> --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
> --enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo
> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
> --enable-mpfr --disable-werror --enable-checking=release
> x86_64-linux-gnu
> Thread model: posix
> gcc version 4.0.3 20060128 (prerelease) (Debian 4.0.2-8)
> 
> Version of valgrind:
> valgrind-3.1.0
> 
> Please tell me what further information you need to fix this bug.
> 
> -- System Information:
> Debian Release: testing/unstable
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
> Architecture: amd64 (x86_64)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.15-1-amd64-k8
> Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
> 
> -- no debconf information

> #include <sys/types.h>
> #include <pwd.h>
> #include <stdlib.h>
> #include <stdio.h>
> int main()
> {
>    const char* user="edwin";
>    struct passwd pwbuf;
>    struct passwd* result=NULL;
>    const size_t length=4096;
>    void* buffer = malloc( sizeof(struct passwd) + length);
>    if (buffer == NULL) 
>      {
> 	exit(1);/*OOM*/
>      }
>    int status = getpwnam_r(user,buffer,sizeof(struct passwd)+(char*)buffer,length,&result);
>    if(!status && result==buffer) 
>      {
> 	printf("success\n");
> 
>      }
>    else printf("failed\n");
>    free(buffer);
>    return 0;
> }

> ==11542== Memcheck, a memory error detector.
> ==11542== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
> ==11542== Using LibVEX rev 1471, a library for dynamic binary translation.
> ==11542== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
> ==11542== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
> ==11542== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
> ==11542== 
> ==11542== My PID = 11542, parent PID = 9306.  Prog and args are:
> ==11542==    ./getgrouplist
> ==11542== 
> --11542-- 
> --11542-- Command line
> --11542--    ./getgrouplist
> --11542-- Startup, with flags:
> --11542--    --tool=memcheck
> --11542--    -v
> --11542--    --leak-resolution=high
> --11542--    --leak-check=yes
> --11542--    --num-callers=15
> --11542--    --log-file=grouplist.log
> --11542-- Contents of /proc/version:
> --11542--   Linux version 2.6.15-1-amd64-k8 (Debian 2.6.15-3) (horms@verge.net.au) (gcc version 4.0.3 20060115 (prerelease) (Debian 4.0.2-7)) #2 Thu Jan 19 07:43:40 UTC 2006
> --11542-- Arch and subarch: AMD64, NONE
> --11542-- Valgrind library directory: /usr/local/lib/valgrind
> --11542-- Reading syms from /home/edwin/br/getgrouplist (0x400000)
> --11542-- Reading syms from /lib/ld-2.3.5.so (0x4000000)
> --11542-- Reading debug info from /lib/ld-2.3.5.so...
> --11542-- ... CRC mismatch (computed 3E8F25D6 wanted A270983D)
> --11542-- Reading debug info from /usr/lib/debug/lib/ld-2.3.5.so...
> --11542--    object doesn't have a symbol table
> --11542-- Reading syms from /usr/local/lib/valgrind/amd64-linux/memcheck (0x70000000)
> --11542--    object doesn't have a dynamic symbol table
> --11542-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
> --11542-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_core.so (0x4918000)
> --11542-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_memcheck.so (0x4A19000)
> --11542-- Reading syms from /usr/lib/debug/libc-2.3.5.so (0x4B1F000)
> --11542-- REDIR: 0x4B92520 (rindex) redirected to 0x4A1C430 (rindex)
> --11542-- REDIR: 0x4B8C8B0 (malloc) redirected to 0x4A1A99D (malloc)
> --11542-- REDIR: 0x4B920D0 (strlen) redirected to 0x4A1C5E0 (strlen)
> --11542-- REDIR: 0x4B92C70 (memchr) redirected to 0x4A1C760 (memchr)
> --11542-- REDIR: 0x4B93C10 (memcpy) redirected to 0x4A1C9E0 (memcpy)
> --11542-- REDIR: 0x4B94590 (strchrnul) redirected to 0x4A1C990 (strchrnul)
> --11542-- REDIR: 0x4B8AC20 (free) redirected to 0x4A1B535 (free)
> --11542-- REDIR: 0x4B91B30 (strcmp) redirected to 0x4A1C6C0 (strcmp)
> --11542-- REDIR: 0x4B93920 (stpcpy) redirected to 0x4A1CCE0 (stpcpy)
> --11542-- REDIR: 0x4B91980 (index) redirected to 0x4A1C520 (index)
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006C31: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> ==11542== 
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> --11542-- REDIR: 0x4B8C580 (calloc) redirected to 0x4A1BD00 (calloc)
> ==11542== 
> ==11542== Invalid read of size 8
> ==11542==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> ==11542==  Address 0x4D5DE48 is 32 bytes inside a block of size 34 alloc'd
> ==11542==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11542==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> --11542-- Reading syms from /usr/lib/debug/libnss_compat-2.3.5.so (0x4E5D000)
> ==11542== 
> ==11542== Invalid read of size 8
> ==11542==    at 0x4010D3E: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==  Address 0x4D5E398 is 24 bytes inside a block of size 27 alloc'd
> ==11542==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11542==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> --11542-- Reading syms from /usr/lib/debug/libnsl-2.3.5.so (0x4F66000)
> --11542-- REDIR: 0x4B91B70 (strcpy) redirected to 0x4A1CC20 (strcpy)
> --11542-- Reading syms from /usr/lib/debug/libnss_nis-2.3.5.so (0x507D000)
> --11542-- Reading syms from /usr/lib/debug/libnss_files-2.3.5.so (0x5188000)
> --11542-- REDIR: 0x4B944C0 (rawmemchr) redirected to 0x4A1C9C0 (rawmemchr)
> --11542-- REDIR: 0x4B93500 (memset) redirected to 0x4A1C900 (memset)
> --11542-- discard syms at 0x4E5D000-0x4F66000 in /usr/lib/debug/libnss_compat-2.3.5.so due to munmap()
> --11542-- REDIR: 0x4B93360 (memmove) redirected to 0x4A1C930 (memmove)
> --11542-- discard syms at 0x507D000-0x5188000 in /usr/lib/debug/libnss_nis-2.3.5.so due to munmap()
> --11542-- discard syms at 0x4F66000-0x507D000 in /usr/lib/debug/libnsl-2.3.5.so due to munmap()
> --11542-- discard syms at 0x5188000-0x5294000 in /usr/lib/debug/libnss_files-2.3.5.so due to munmap()
> ==11542== 
> ==11542== ERROR SUMMARY: 9 errors from 7 contexts (suppressed: 2 from 1)
> ==11542== 
> ==11542== 1 errors in context 1 of 7:
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> ==11542== 
> ==11542== 1 errors in context 2 of 7:
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== 1 errors in context 3 of 7:
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== 1 errors in context 4 of 7:
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== 1 errors in context 5 of 7:
> ==11542== Conditional jump or move depends on uninitialised value(s)
> ==11542==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11542== 
> ==11542== 2 errors in context 6 of 7:
> ==11542== Invalid read of size 8
> ==11542==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> ==11542==  Address 0x4D5DE48 is 32 bytes inside a block of size 34 alloc'd
> ==11542==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11542==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> ==11542== 
> ==11542== 2 errors in context 7 of 7:
> ==11542== Invalid read of size 8
> ==11542==    at 0x4010D3E: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==  Address 0x4D5E398 is 24 bytes inside a block of size 27 alloc'd
> ==11542==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11542==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11542==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11542==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11542==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11542==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11542==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> --11542-- 
> --11542-- supp:    2 Ubuntu-stripped-ld.so
> ==11542== 
> ==11542== IN SUMMARY: 9 errors from 7 contexts (suppressed: 2 from 1)
> ==11542== 
> ==11542== malloc/free: in use at exit: 340 bytes in 13 blocks.
> ==11542== malloc/free: 68 allocs, 55 frees, 8,471 bytes allocated.
> ==11542== 
> ==11542== searching for pointers to 13 not-freed blocks.
> ==11542== checked 64,056 bytes.
> ==11542== 
> ==11542== 
> ==11542== 340 (52 direct, 288 indirect) bytes in 1 blocks are definitely lost in loss record 13 of 13
> ==11542==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11542==    by 0x4BFB2CF: nss_parse_service_list (nsswitch.c:530)
> ==11542==    by 0x4BFB9C7: __nss_database_lookup (nsswitch.c:134)
> ==11542==    by 0x4E63213: ???
> ==11542==    by 0x4BAF35B: internal_getgrouplist (initgroups.c:104)
> ==11542==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11542==    by 0x40052D: main (getgrouplist.c:9)
> ==11542== 
> ==11542== LEAK SUMMARY:
> ==11542==    definitely lost: 52 bytes in 1 blocks.
> ==11542==    indirectly lost: 288 bytes in 12 blocks.
> ==11542==      possibly lost: 0 bytes in 0 blocks.
> ==11542==    still reachable: 0 bytes in 0 blocks.
> ==11542==         suppressed: 0 bytes in 0 blocks.
> ==11542== Reachable blocks (those to which a pointer was found) are not shown.
> ==11542== To see them, rerun with: --show-reachable=yes
> --11542--  memcheck: sanity checks: 1 cheap, 1 expensive
> --11542--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
> --11542--  memcheck: auxmaps: 0 searches, 0 comparisons
> --11542--  memcheck: secondaries: 17 issued (1088k, 1M)
> --11542--  memcheck: secondaries: 66 accessible and distinguished (4224k, 4M)
> --11542--     tt/tc: 4,767 tt lookups requiring 4,833 probes
> --11542--     tt/tc: 4,767 fast-cache updates, 6 flushes
> --11542-- translate: new        2,274 (50,664 -> 927,467; ratio 183:10) [0 scs]
> --11542-- translate: dumped     0 (0 -> ??)
> --11542-- translate: discarded  117 (2,137 -> ??)
> --11542-- scheduler: 61,005 jumps (bb entries).
> --11542-- scheduler: 1/2,724 major/minor sched events.
> --11542--    sanity: 2 cheap, 1 expensive checks.
> --11542--    exectx: 30,011 lists, 68 contexts (avg 0 per list)
> --11542--    exectx: 134 searches, 265 full compares (1,977 per 1000)
> --11542--    exectx: 0 cmp2, 25 cmp4, 66 cmpAll

> ==11536== Memcheck, a memory error detector.
> ==11536== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
> ==11536== Using LibVEX rev 1471, a library for dynamic binary translation.
> ==11536== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
> ==11536== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
> ==11536== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
> ==11536== 
> ==11536== My PID = 11536, parent PID = 9306.  Prog and args are:
> ==11536==    ./getpwuid
> ==11536== 
> --11536-- 
> --11536-- Command line
> --11536--    ./getpwuid
> --11536-- Startup, with flags:
> --11536--    --tool=memcheck
> --11536--    -v
> --11536--    --leak-resolution=high
> --11536--    --leak-check=yes
> --11536--    --num-callers=15
> --11536--    --log-file=pwuid.log
> --11536-- Contents of /proc/version:
> --11536--   Linux version 2.6.15-1-amd64-k8 (Debian 2.6.15-3) (horms@verge.net.au) (gcc version 4.0.3 20060115 (prerelease) (Debian 4.0.2-7)) #2 Thu Jan 19 07:43:40 UTC 2006
> --11536-- Arch and subarch: AMD64, NONE
> --11536-- Valgrind library directory: /usr/local/lib/valgrind
> --11536-- Reading syms from /home/edwin/br/getpwuid (0x400000)
> --11536-- Reading syms from /lib/ld-2.3.5.so (0x4000000)
> --11536-- Reading debug info from /lib/ld-2.3.5.so...
> --11536-- ... CRC mismatch (computed 3E8F25D6 wanted A270983D)
> --11536-- Reading debug info from /usr/lib/debug/lib/ld-2.3.5.so...
> --11536--    object doesn't have a symbol table
> --11536-- Reading syms from /usr/local/lib/valgrind/amd64-linux/memcheck (0x70000000)
> --11536--    object doesn't have a dynamic symbol table
> --11536-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
> --11536-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_core.so (0x4918000)
> --11536-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_memcheck.so (0x4A19000)
> --11536-- Reading syms from /usr/lib/debug/libc-2.3.5.so (0x4B1F000)
> --11536-- REDIR: 0x4B92520 (rindex) redirected to 0x4A1C430 (rindex)
> --11536-- REDIR: 0x4B8C8B0 (malloc) redirected to 0x4A1A99D (malloc)
> --11536-- REDIR: 0x4B920D0 (strlen) redirected to 0x4A1C5E0 (strlen)
> --11536-- REDIR: 0x4B92C70 (memchr) redirected to 0x4A1C760 (memchr)
> --11536-- REDIR: 0x4B93C10 (memcpy) redirected to 0x4A1C9E0 (memcpy)
> --11536-- REDIR: 0x4B94590 (strchrnul) redirected to 0x4A1C990 (strchrnul)
> --11536-- REDIR: 0x4B8AC20 (free) redirected to 0x4A1B535 (free)
> --11536-- REDIR: 0x4B91B30 (strcmp) redirected to 0x4A1C6C0 (strcmp)
> --11536-- REDIR: 0x4B93920 (stpcpy) redirected to 0x4A1CCE0 (stpcpy)
> --11536-- REDIR: 0x4B91980 (index) redirected to 0x4A1C520 (index)
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006C31: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> ==11536== 
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> --11536-- REDIR: 0x4B8C580 (calloc) redirected to 0x4A1BD00 (calloc)
> ==11536== 
> ==11536== Invalid read of size 8
> ==11536==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> ==11536==  Address 0x4D5E218 is 32 bytes inside a block of size 34 alloc'd
> ==11536==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11536==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> --11536-- Reading syms from /usr/lib/debug/libnss_compat-2.3.5.so (0x4E5D000)
> ==11536== 
> ==11536== Invalid read of size 8
> ==11536==    at 0x4010D3E: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==  Address 0x4D5E768 is 24 bytes inside a block of size 27 alloc'd
> ==11536==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11536==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> --11536-- Reading syms from /usr/lib/debug/libnsl-2.3.5.so (0x4F66000)
> --11536-- REDIR: 0x4B91B70 (strcpy) redirected to 0x4A1CC20 (strcpy)
> --11536-- Reading syms from /usr/lib/debug/libnss_nis-2.3.5.so (0x507D000)
> --11536-- Reading syms from /usr/lib/debug/libnss_files-2.3.5.so (0x5188000)
> --11536-- REDIR: 0x4B93500 (memset) redirected to 0x4A1C900 (memset)
> --11536-- discard syms at 0x4E5D000-0x4F66000 in /usr/lib/debug/libnss_compat-2.3.5.so due to munmap()
> --11536-- REDIR: 0x4B93360 (memmove) redirected to 0x4A1C930 (memmove)
> --11536-- discard syms at 0x507D000-0x5188000 in /usr/lib/debug/libnss_nis-2.3.5.so due to munmap()
> --11536-- discard syms at 0x4F66000-0x507D000 in /usr/lib/debug/libnsl-2.3.5.so due to munmap()
> --11536-- discard syms at 0x5188000-0x5294000 in /usr/lib/debug/libnss_files-2.3.5.so due to munmap()
> ==11536== 
> ==11536== ERROR SUMMARY: 9 errors from 7 contexts (suppressed: 2 from 1)
> ==11536== 
> ==11536== 1 errors in context 1 of 7:
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> ==11536== 
> ==11536== 1 errors in context 2 of 7:
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== 1 errors in context 3 of 7:
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== 1 errors in context 4 of 7:
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== 1 errors in context 5 of 7:
> ==11536== Conditional jump or move depends on uninitialised value(s)
> ==11536==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11536== 
> ==11536== 2 errors in context 6 of 7:
> ==11536== Invalid read of size 8
> ==11536==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> ==11536==  Address 0x4D5E218 is 32 bytes inside a block of size 34 alloc'd
> ==11536==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11536==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> ==11536== 
> ==11536== 2 errors in context 7 of 7:
> ==11536== Invalid read of size 8
> ==11536==    at 0x4010D3E: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==  Address 0x4D5E768 is 24 bytes inside a block of size 27 alloc'd
> ==11536==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11536==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11536==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11536==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11536==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11536==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11536==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11536==    by 0x4BB176B: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> --11536-- 
> --11536-- supp:    2 Ubuntu-stripped-ld.so
> ==11536== 
> ==11536== IN SUMMARY: 9 errors from 7 contexts (suppressed: 2 from 1)
> ==11536== 
> ==11536== malloc/free: in use at exit: 292 bytes in 11 blocks.
> ==11536== malloc/free: 66 allocs, 55 frees, 9,403 bytes allocated.
> ==11536== 
> ==11536== searching for pointers to 11 not-freed blocks.
> ==11536== checked 64,064 bytes.
> ==11536== 
> ==11536== 
> ==11536== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 11 of 11
> ==11536==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11536==    by 0x4BFB2CF: nss_parse_service_list (nsswitch.c:530)
> ==11536==    by 0x4BFB9C7: __nss_database_lookup (nsswitch.c:134)
> ==11536==    by 0x4E5F5DF: ???
> ==11536==    by 0x4E601E3: ???
> ==11536==    by 0x4BB1675: getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:207)
> ==11536==    by 0x4BB0FDE: getpwuid (getXXbyYY.c:116)
> ==11536==    by 0x400509: main (getpwuid.c:9)
> ==11536== 
> ==11536== LEAK SUMMARY:
> ==11536==    definitely lost: 52 bytes in 1 blocks.
> ==11536==    indirectly lost: 240 bytes in 10 blocks.
> ==11536==      possibly lost: 0 bytes in 0 blocks.
> ==11536==    still reachable: 0 bytes in 0 blocks.
> ==11536==         suppressed: 0 bytes in 0 blocks.
> ==11536== Reachable blocks (those to which a pointer was found) are not shown.
> ==11536== To see them, rerun with: --show-reachable=yes
> --11536--  memcheck: sanity checks: 1 cheap, 1 expensive
> --11536--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
> --11536--  memcheck: auxmaps: 0 searches, 0 comparisons
> --11536--  memcheck: secondaries: 18 issued (1152k, 1M)
> --11536--  memcheck: secondaries: 66 accessible and distinguished (4224k, 4M)
> --11536--     tt/tc: 4,768 tt lookups requiring 4,849 probes
> --11536--     tt/tc: 4,768 fast-cache updates, 6 flushes
> --11536-- translate: new        2,273 (50,759 -> 930,326; ratio 183:10) [0 scs]
> --11536-- translate: dumped     0 (0 -> ??)
> --11536-- translate: discarded  131 (2,314 -> ??)
> --11536-- scheduler: 57,386 jumps (bb entries).
> --11536-- scheduler: 1/2,723 major/minor sched events.
> --11536--    sanity: 2 cheap, 1 expensive checks.
> --11536--    exectx: 30,011 lists, 66 contexts (avg 0 per list)
> --11536--    exectx: 132 searches, 241 full compares (1,825 per 1000)
> --11536--    exectx: 0 cmp2, 25 cmp4, 45 cmpAll

> ==11539== Memcheck, a memory error detector.
> ==11539== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
> ==11539== Using LibVEX rev 1471, a library for dynamic binary translation.
> ==11539== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
> ==11539== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
> ==11539== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
> ==11539== 
> ==11539== My PID = 11539, parent PID = 9306.  Prog and args are:
> ==11539==    ./getpwnam
> ==11539== 
> --11539-- 
> --11539-- Command line
> --11539--    ./getpwnam
> --11539-- Startup, with flags:
> --11539--    --tool=memcheck
> --11539--    -v
> --11539--    --leak-resolution=high
> --11539--    --leak-check=yes
> --11539--    --num-callers=15
> --11539--    --log-file=pwnam.log
> --11539-- Contents of /proc/version:
> --11539--   Linux version 2.6.15-1-amd64-k8 (Debian 2.6.15-3) (horms@verge.net.au) (gcc version 4.0.3 20060115 (prerelease) (Debian 4.0.2-7)) #2 Thu Jan 19 07:43:40 UTC 2006
> --11539-- Arch and subarch: AMD64, NONE
> --11539-- Valgrind library directory: /usr/local/lib/valgrind
> --11539-- Reading syms from /home/edwin/br/getpwnam (0x400000)
> --11539-- Reading syms from /lib/ld-2.3.5.so (0x4000000)
> --11539-- Reading debug info from /lib/ld-2.3.5.so...
> --11539-- ... CRC mismatch (computed 3E8F25D6 wanted A270983D)
> --11539-- Reading debug info from /usr/lib/debug/lib/ld-2.3.5.so...
> --11539--    object doesn't have a symbol table
> --11539-- Reading syms from /usr/local/lib/valgrind/amd64-linux/memcheck (0x70000000)
> --11539--    object doesn't have a dynamic symbol table
> --11539-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
> --11539-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_core.so (0x4918000)
> --11539-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_memcheck.so (0x4A19000)
> --11539-- Reading syms from /usr/lib/debug/libc-2.3.5.so (0x4B1F000)
> --11539-- REDIR: 0x4B92520 (rindex) redirected to 0x4A1C430 (rindex)
> --11539-- REDIR: 0x4B8C8B0 (malloc) redirected to 0x4A1A99D (malloc)
> --11539-- REDIR: 0x4B920D0 (strlen) redirected to 0x4A1C5E0 (strlen)
> --11539-- REDIR: 0x4B92C70 (memchr) redirected to 0x4A1C760 (memchr)
> --11539-- REDIR: 0x4B93C10 (memcpy) redirected to 0x4A1C9E0 (memcpy)
> --11539-- REDIR: 0x4B94590 (strchrnul) redirected to 0x4A1C990 (strchrnul)
> --11539-- REDIR: 0x4B8AC20 (free) redirected to 0x4A1B535 (free)
> --11539-- REDIR: 0x4B91B30 (strcmp) redirected to 0x4A1C6C0 (strcmp)
> --11539-- REDIR: 0x4B93920 (stpcpy) redirected to 0x4A1CCE0 (stpcpy)
> --11539-- REDIR: 0x4B91980 (index) redirected to 0x4A1C520 (index)
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006C31: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> ==11539== 
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> --11539-- REDIR: 0x4B8C580 (calloc) redirected to 0x4A1BD00 (calloc)
> ==11539== 
> ==11539== Invalid read of size 8
> ==11539==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> ==11539==  Address 0x4D5EE48 is 32 bytes inside a block of size 34 alloc'd
> ==11539==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11539==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> --11539-- Reading syms from /usr/lib/debug/libnss_compat-2.3.5.so (0x4E5D000)
> ==11539== 
> ==11539== Invalid read of size 8
> ==11539==    at 0x4010D3E: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==  Address 0x4D5F398 is 24 bytes inside a block of size 27 alloc'd
> ==11539==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11539==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> --11539-- Reading syms from /usr/lib/debug/libnsl-2.3.5.so (0x4F66000)
> --11539-- REDIR: 0x4B91B70 (strcpy) redirected to 0x4A1CC20 (strcpy)
> --11539-- Reading syms from /usr/lib/debug/libnss_nis-2.3.5.so (0x507D000)
> --11539-- Reading syms from /usr/lib/debug/libnss_files-2.3.5.so (0x5188000)
> --11539-- REDIR: 0x4B93500 (memset) redirected to 0x4A1C900 (memset)
> --11539-- discard syms at 0x4E5D000-0x4F66000 in /usr/lib/debug/libnss_compat-2.3.5.so due to munmap()
> --11539-- REDIR: 0x4B93360 (memmove) redirected to 0x4A1C930 (memmove)
> --11539-- discard syms at 0x507D000-0x5188000 in /usr/lib/debug/libnss_nis-2.3.5.so due to munmap()
> --11539-- discard syms at 0x4F66000-0x507D000 in /usr/lib/debug/libnsl-2.3.5.so due to munmap()
> --11539-- discard syms at 0x5188000-0x5294000 in /usr/lib/debug/libnss_files-2.3.5.so due to munmap()
> ==11539== 
> ==11539== ERROR SUMMARY: 9 errors from 7 contexts (suppressed: 2 from 1)
> ==11539== 
> ==11539== 1 errors in context 1 of 7:
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> ==11539== 
> ==11539== 1 errors in context 2 of 7:
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== 1 errors in context 3 of 7:
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== 1 errors in context 4 of 7:
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== 1 errors in context 5 of 7:
> ==11539== Conditional jump or move depends on uninitialised value(s)
> ==11539==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11539== 
> ==11539== 2 errors in context 6 of 7:
> ==11539== Invalid read of size 8
> ==11539==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> ==11539==  Address 0x4D5EE48 is 32 bytes inside a block of size 34 alloc'd
> ==11539==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11539==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> ==11539== 
> ==11539== 2 errors in context 7 of 7:
> ==11539== Invalid read of size 8
> ==11539==    at 0x4010D3E: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==  Address 0x4D5F398 is 24 bytes inside a block of size 27 alloc'd
> ==11539==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11539==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4009F6C: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x400A9A3: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1D5AD: dl_open_worker (dl-open.c:294)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11539==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11539==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11539==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11539==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11539==    by 0x4BFB163: __nss_lookup (nsswitch.c:150)
> ==11539==    by 0x4BB157B: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:171)
> --11539-- 
> --11539-- supp:    2 Ubuntu-stripped-ld.so
> ==11539== 
> ==11539== IN SUMMARY: 9 errors from 7 contexts (suppressed: 2 from 1)
> ==11539== 
> ==11539== malloc/free: in use at exit: 292 bytes in 11 blocks.
> ==11539== malloc/free: 66 allocs, 55 frees, 12,523 bytes allocated.
> ==11539== 
> ==11539== searching for pointers to 11 not-freed blocks.
> ==11539== checked 64,040 bytes.
> ==11539== 
> ==11539== 
> ==11539== 292 (52 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 11 of 11
> ==11539==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11539==    by 0x4BFB2CF: nss_parse_service_list (nsswitch.c:530)
> ==11539==    by 0x4BFB9C7: __nss_database_lookup (nsswitch.c:134)
> ==11539==    by 0x4E5F5DF: ???
> ==11539==    by 0x4E60C9B: ???
> ==11539==    by 0x4BB1485: getpwnam_r@@GLIBC_2.2.5 (getXXbyYY_r.c:207)
> ==11539==    by 0x400639: main (getpwnam.c:16)
> ==11539== 
> ==11539== LEAK SUMMARY:
> ==11539==    definitely lost: 52 bytes in 1 blocks.
> ==11539==    indirectly lost: 240 bytes in 10 blocks.
> ==11539==      possibly lost: 0 bytes in 0 blocks.
> ==11539==    still reachable: 0 bytes in 0 blocks.
> ==11539==         suppressed: 0 bytes in 0 blocks.
> ==11539== Reachable blocks (those to which a pointer was found) are not shown.
> ==11539== To see them, rerun with: --show-reachable=yes
> --11539--  memcheck: sanity checks: 1 cheap, 1 expensive
> --11539--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
> --11539--  memcheck: auxmaps: 0 searches, 0 comparisons
> --11539--  memcheck: secondaries: 18 issued (1152k, 1M)
> --11539--  memcheck: secondaries: 66 accessible and distinguished (4224k, 4M)
> --11539--     tt/tc: 4,908 tt lookups requiring 4,988 probes
> --11539--     tt/tc: 4,908 fast-cache updates, 6 flushes
> --11539-- translate: new        2,344 (51,973 -> 956,389; ratio 184:10) [0 scs]
> --11539-- translate: dumped     0 (0 -> ??)
> --11539-- translate: discarded  133 (2,234 -> ??)
> --11539-- scheduler: 58,684 jumps (bb entries).
> --11539-- scheduler: 1/2,796 major/minor sched events.
> --11539--    sanity: 2 cheap, 1 expensive checks.
> --11539--    exectx: 30,011 lists, 66 contexts (avg 0 per list)
> --11539--    exectx: 132 searches, 213 full compares (1,613 per 1000)
> --11539--    exectx: 0 cmp2, 25 cmp4, 45 cmpAll

> ==11978== Memcheck, a memory error detector.
> ==11978== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
> ==11978== Using LibVEX rev 1471, a library for dynamic binary translation.
> ==11978== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
> ==11978== Using valgrind-3.1.0, a dynamic binary instrumentation framework.
> ==11978== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
> ==11978== 
> ==11978== My PID = 11978, parent PID = 9306.  Prog and args are:
> ==11978==    ./getgrouplist
> ==11978== 
> --11978-- 
> --11978-- Command line
> --11978--    ./getgrouplist
> --11978-- Startup, with flags:
> --11978--    --tool=memcheck
> --11978--    -v
> --11978--    --leak-resolution=high
> --11978--    --leak-check=yes
> --11978--    --num-callers=15
> --11978--    --log-file=grouplist.log_ok
> --11978-- Contents of /proc/version:
> --11978--   Linux version 2.6.15-1-amd64-k8 (Debian 2.6.15-3) (horms@verge.net.au) (gcc version 4.0.3 20060115 (prerelease) (Debian 4.0.2-7)) #2 Thu Jan 19 07:43:40 UTC 2006
> --11978-- Arch and subarch: AMD64, NONE
> --11978-- Valgrind library directory: /usr/local/lib/valgrind
> --11978-- Reading syms from /home/edwin/br/getgrouplist (0x400000)
> --11978-- Reading syms from /lib/ld-2.3.5.so (0x4000000)
> --11978-- Reading debug info from /lib/ld-2.3.5.so...
> --11978-- ... CRC mismatch (computed 3E8F25D6 wanted A270983D)
> --11978-- Reading debug info from /usr/lib/debug/lib/ld-2.3.5.so...
> --11978--    object doesn't have a symbol table
> --11978-- Reading syms from /usr/local/lib/valgrind/amd64-linux/memcheck (0x70000000)
> --11978--    object doesn't have a dynamic symbol table
> --11978-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
> --11978-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_core.so (0x4918000)
> --11978-- Reading syms from /usr/local/lib/valgrind/amd64-linux/vgpreload_memcheck.so (0x4A19000)
> --11978-- Reading syms from /usr/lib/debug/libc-2.3.5.so (0x4B1F000)
> --11978-- REDIR: 0x4B92520 (rindex) redirected to 0x4A1C430 (rindex)
> --11978-- REDIR: 0x4B8C8B0 (malloc) redirected to 0x4A1A99D (malloc)
> --11978-- REDIR: 0x4B920D0 (strlen) redirected to 0x4A1C5E0 (strlen)
> --11978-- REDIR: 0x4B92C70 (memchr) redirected to 0x4A1C760 (memchr)
> --11978-- REDIR: 0x4B93C10 (memcpy) redirected to 0x4A1C9E0 (memcpy)
> --11978-- REDIR: 0x4B94590 (strchrnul) redirected to 0x4A1C990 (strchrnul)
> --11978-- REDIR: 0x4B8AC20 (free) redirected to 0x4A1B535 (free)
> --11978-- REDIR: 0x4B91B30 (strcmp) redirected to 0x4A1C6C0 (strcmp)
> --11978-- REDIR: 0x4B93920 (stpcpy) redirected to 0x4A1CCE0 (stpcpy)
> --11978-- REDIR: 0x4B91980 (index) redirected to 0x4A1C520 (index)
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006C31: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008BCC: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> --11978-- REDIR: 0x4B8C580 (calloc) redirected to 0x4A1BD00 (calloc)
> ==11978== 
> ==11978== Invalid read of size 8
> ==11978==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978==  Address 0x4D5DE48 is 32 bytes inside a block of size 33 alloc'd
> ==11978==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11978==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> --11978-- Reading syms from /usr/lib/debug/libnss_files-2.3.5.so (0x4E5D000)
> --11978-- REDIR: 0x4B91B70 (strcpy) redirected to 0x4A1CC20 (strcpy)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D4B: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x40086C4: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F294: do_dlsym (dl-libc.c:88)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F3E2: __libc_dlsym (dl-libc.c:42)
> ==11978==    by 0x4BFAEA3: __nss_lookup_function (nsswitch.c:381)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4011404: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x40086F4: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F294: do_dlsym (dl-libc.c:88)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F3E2: __libc_dlsym (dl-libc.c:42)
> ==11978==    by 0x4BFAEA3: __nss_lookup_function (nsswitch.c:381)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== Invalid read of size 8
> ==11978==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B752: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B8E3: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008730: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F294: do_dlsym (dl-libc.c:88)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F3E2: __libc_dlsym (dl-libc.c:42)
> ==11978==    by 0x4BFAEA3: __nss_lookup_function (nsswitch.c:381)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978==  Address 0x4D5DE48 is 32 bytes inside a block of size 33 alloc'd
> ==11978==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11978==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D17: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B75E: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B8E3: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008730: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F294: do_dlsym (dl-libc.c:88)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F3E2: __libc_dlsym (dl-libc.c:42)
> ==11978==    by 0x4BFAEA3: __nss_lookup_function (nsswitch.c:381)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> --11978-- REDIR: 0x4B944C0 (rawmemchr) redirected to 0x4A1C9C0 (rawmemchr)
> --11978-- REDIR: 0x4B93500 (memset) redirected to 0x4A1C900 (memset)
> --11978-- discard syms at 0x4E5D000-0x4F69000 in /usr/lib/debug/libnss_files-2.3.5.so due to munmap()
> ==11978== 
> ==11978== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 2 from 1)
> ==11978== 
> ==11978== 1 errors in context 1 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D17: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B75E: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B8E3: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008730: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F294: do_dlsym (dl-libc.c:88)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F3E2: __libc_dlsym (dl-libc.c:42)
> ==11978==    by 0x4BFAEA3: __nss_lookup_function (nsswitch.c:381)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== 1 errors in context 2 of 10:
> ==11978== Invalid read of size 8
> ==11978==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B752: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x400B8E3: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008730: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F294: do_dlsym (dl-libc.c:88)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F3E2: __libc_dlsym (dl-libc.c:42)
> ==11978==    by 0x4BFAEA3: __nss_lookup_function (nsswitch.c:381)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978==  Address 0x4D5DE48 is 32 bytes inside a block of size 33 alloc'd
> ==11978==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11978==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== 1 errors in context 3 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4011404: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== 1 errors in context 4 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D4B: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== 1 errors in context 5 of 10:
> ==11978== Invalid read of size 8
> ==11978==    at 0x4010CF0: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4008D8B: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x40041B1: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006CE6: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978==  Address 0x4D5DE48 is 32 bytes inside a block of size 33 alloc'd
> ==11978==    at 0x4A1AA16: malloc (vg_replace_malloc.c:149)
> ==11978==    by 0x40056FC: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4006D9C: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1D550: dl_open_worker (dl-open.c:259)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1DE0A: _dl_open (dl-open.c:577)
> ==11978==    by 0x4C1F247: do_dlopen (dl-libc.c:80)
> ==11978==    by 0x400B970: (within /lib/ld-2.3.5.so)
> ==11978==    by 0x4C1F361: __libc_dlopen_mode (dl-libc.c:42)
> ==11978==    by 0x4BFAFCA: __nss_lookup_function (nsswitch.c:344)
> ==11978==    by 0x4BAF31D: internal_getgrouplist (initgroups.c:93)
> ==11978==    by 0x4BAF551: getgrouplist (initgroups.c:158)
> ==11978==    by 0x40052D: main (getgrouplist.c:9)
> ==11978== 
> ==11978== 1 errors in context 6 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== 1 errors in context 7 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010D31: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== 1 errors in context 8 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010BD4: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== 1 errors in context 9 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010BC9: (within /lib/ld-2.3.5.so)
> ==11978== 
> ==11978== 1 errors in context 10 of 10:
> ==11978== Conditional jump or move depends on uninitialised value(s)
> ==11978==    at 0x4010BBE: (within /lib/ld-2.3.5.so)
> --11978-- 
> --11978-- supp:    2 Ubuntu-stripped-ld.so
> ==11978== 
> ==11978== IN SUMMARY: 10 errors from 10 contexts (suppressed: 2 from 1)
> ==11978== 
> ==11978== malloc/free: in use at exit: 0 bytes in 0 blocks.
> ==11978== malloc/free: 46 allocs, 46 frees, 4,094 bytes allocated.
> ==11978== 
> ==11978== No malloc'd blocks -- no leaks are possible.
> --11978--  memcheck: sanity checks: 0 cheap, 1 expensive
> --11978--  memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
> --11978--  memcheck: auxmaps: 0 searches, 0 comparisons
> --11978--  memcheck: secondaries: 14 issued (896k, 0M)
> --11978--  memcheck: secondaries: 66 accessible and distinguished (4224k, 4M)
> --11978--     tt/tc: 4,475 tt lookups requiring 4,552 probes
> --11978--     tt/tc: 4,475 fast-cache updates, 3 flushes
> --11978-- translate: new        2,224 (49,528 -> 905,364; ratio 182:10) [0 scs]
> --11978-- translate: dumped     0 (0 -> ??)
> --11978-- translate: discarded  60 (1,034 -> ??)
> --11978-- scheduler: 44,799 jumps (bb entries).
> --11978-- scheduler: 0/2,422 major/minor sched events.
> --11978--    sanity: 1 cheap, 1 expensive checks.
> --11978--    exectx: 30,011 lists, 56 contexts (avg 0 per list)
> --11978--    exectx: 104 searches, 190 full compares (1,826 per 1000)
> --11978--    exectx: 0 cmp2, 46 cmp4, 0 cmpAll


-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgp_LOuAEqeEf.pgp
Description: PGP signature


Reply to: