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

Bug#273051: getpwuid/getpwgid leak still reproducible



Using experimental glibc and the test cases in first message
of bugreport, this is still reproducible: (see the
nss_parse_service_list part).

[0:17 wombat]/tmp> cat /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

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis


[0:17 wombat]/tmp> valgrind --tool=memcheck -v --leak-resolution=high --leak-check=yes --num-callers=15 ./a.out
==9228== Memcheck, a memory error detector for x86-linux.
==9228== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==9228== Using valgrind-2.4.0, a program supervision framework for
x86-linux.
==9228== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==9228== Valgrind library directory: /usr/lib/valgrind
==9228== Command line
==9228==    ./a.out
==9228== Startup, with flags:
==9228==    --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
==9228==    --tool=memcheck
==9228==    -v
==9228==    --leak-resolution=high
==9228==    --leak-check=yes
==9228==    --num-callers=15
==9228==    --
==9228== Contents of /proc/version:
==9228==   Linux version 2.6.11.2dyntick (root@wombat) (gcc version
3.3.5 (Debian 1:3.3.5-8)) #1 Wed Mar 9 23:37:00 EET 2005
==9228== Reading syms from /tmp/a.out (0x8048000)
==9228== Reading syms from /lib/ld-2.3.5.so (0x1B8E4000)
==9228==    object doesn't have a symbol table
==9228== Reading debug info from /lib/ld-2.3.5.so...
==9228== ... CRC mismatch (computed 81AAA181 wanted 241F265A)
==9228== Reading debug info from /usr/lib/debug/lib/ld-2.3.5.so...
==9228==    object doesn't have any debug info
==9228== Reading syms from /usr/lib/valgrind/stage2 (0xB0000000)
==9228== Reading syms from /lib/ld-2.3.5.so (0xB1000000)
==9228==    object doesn't have a symbol table
==9228== Reading debug info from /lib/ld-2.3.5.so...
==9228== ... CRC mismatch (computed 81AAA181 wanted 241F265A)
==9228== Reading debug info from /usr/lib/debug/lib/ld-2.3.5.so...
==9228==    object doesn't have any debug info
==9228== Reading syms from /usr/lib/valgrind/vgskin_memcheck.so
(0xB7C7F000)
==9228== Reading syms from /usr/lib/debug/libc-2.3.5.so (0xB7EE2000)
==9228== Reading syms from /usr/lib/debug/libdl-2.3.5.so (0xB7FFC000)
==9228== Reading suppressions file:
/usr/lib/valgrind/debian-libc6-dbg.supp
==9228== Reading suppressions file: /usr/lib/valgrind/default.supp
==9228==
==9228== Reading syms from /usr/lib/valgrind/vg_inject.so (0x1B8FE000)
==9228== Reading syms from /usr/lib/valgrind/vgpreload_memcheck.so
(0x1B901000)
==9228== Reading syms from /usr/lib/debug/libc-2.3.5.so (0x1B909000)
==9228== Reading syms from /usr/lib/debug/libdl-2.3.5.so (0x1BA26000)
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECB90: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E35: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECBE5: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E35: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECA34: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E79: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECA3F: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E79: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECBE5: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E79: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228== TRANSLATE: 0x1B96BB80 redirected to 0x1B904510
==9228== TRANSLATE: 0x1B96BD40 redirected to 0x1B904A82
==9228== TRANSLATE: 0x1B971120 redirected to 0x1B905C80
==9228== TRANSLATE: 0x1B96C410 redirected to 0x1B904EE2
==9228== Reading syms from /usr/lib/debug/libnss_compat-2.3.5.so
(0x1BB2B000)
==9228== Reading syms from /usr/lib/debug/libnsl-2.3.5.so (0x1BB34000)
==9228==
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECB90: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F3294: dl_open_worker (dl-open.c:343)
==9228==    by 0x1B8EF505: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F362F: _dl_open (dl-open.c:577)
==9228==    by 0x1B9F4ABE: do_dlopen (dl-libc.c:80)
==9228==    by 0x1B8EF505: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F4A64: dlerror_run (dl-libc.c:42)
==9228==    by 0x1B9F4B87: __libc_dlopen_mode (dl-libc.c:153)
==9228==    by 0x1B9D0F97: __nss_lookup_function (nsswitch.c:344)
==9228==    by 0x1B9D0B5E: __nss_lookup (nsswitch.c:150)
==9228==    by 0x1B9D29C6: __nss_passwd_lookup (XXX-lookup.c:73)
==9228==    by 0x1B98FBBD: getpwuid_r@@GLIBC_2.1.2 (getXXbyYY_r.c:171)
==9228==    by 0x1B98F5DE: getpwuid (getXXbyYY.c:103)
==9228==    by 0x80483DF: main (in /tmp/a.out)
==9228==
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECBE5: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F3294: dl_open_worker (dl-open.c:343)
==9228==    by 0x1B8EF505: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F362F: _dl_open (dl-open.c:577)
==9228==    by 0x1B9F4ABE: do_dlopen (dl-libc.c:80)
==9228==    by 0x1B8EF505: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F4A64: dlerror_run (dl-libc.c:42)
==9228==    by 0x1B9F4B87: __libc_dlopen_mode (dl-libc.c:153)
==9228==    by 0x1B9D0F97: __nss_lookup_function (nsswitch.c:344)
==9228==    by 0x1B9D0B5E: __nss_lookup (nsswitch.c:150)
==9228==    by 0x1B9D29C6: __nss_passwd_lookup (XXX-lookup.c:73)
==9228==    by 0x1B98FBBD: getpwuid_r@@GLIBC_2.1.2 (getXXbyYY_r.c:171)
==9228==    by 0x1B98F5DE: getpwuid (getXXbyYY.c:103)
==9228==    by 0x80483DF: main (in /tmp/a.out)
==9228== Reading syms from /usr/lib/debug/libnss_nis-2.3.5.so
(0x1BB49000)
==9228== Reading syms from /usr/lib/debug/libnss_files-2.3.5.so
(0x1BB53000)
==9228== discard syms at 0x1BB2B000-0x1BB33000 in
/usr/lib/debug/libnss_compat-2.3.5.so due to munmap()
==9228== discard syms at 0x1BB49000-0x1BB52000 in
/usr/lib/debug/libnss_nis-2.3.5.so due to munmap()
==9228== discard syms at 0x1BB34000-0x1BB48000 in
/usr/lib/debug/libnsl-2.3.5.so due to munmap()
==9228== discard syms at 0x1BB53000-0x1BB5C000 in
/usr/lib/debug/libnss_files-2.3.5.so due to munmap()
==9228==
==9228== ERROR SUMMARY: 21 errors from 7 contexts (suppressed: 0 from 0)
==9228==
==9228== 1 errors in context 1 of 7:
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECBE5: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E79: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== 1 errors in context 2 of 7:
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECA3F: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E79: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== 1 errors in context 3 of 7:
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECA34: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E79: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== 4 errors in context 4 of 7:
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECBE5: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B9F3294: dl_open_worker (dl-open.c:343)
==9228==    by 0x1B8EF505: (w228==    by 0x1B98FBBD:
getpwuid_r@@GLIBC_2.1.2 (getXXbyYY_r.c:171)
==9228==    by 0x1B98F5DE: getpwuid (getXXbyYY.c:103)
==9228==    by 0x80483DF: main (in /tmp/a.out)
==9228==
==9228== 5 errors in context 6 of 7:
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECBE5: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E35: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228==
==9228== 5 errors in context 7 of 7:
==9228== Conditional jump or move depends on uninitialised value(s)
==9228==    at 0x1B8ECB90: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E5E35: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8F2BAC: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4C9A: (within /lib/ld-2.3.5.so)
==9228==    by 0x1B8E4986: (within /lib/ld-2.3.5.so)
==9228== IN SUMMARY: 21 errors from 7 contexts (suppressed: 0 from 0)
==9228==
==9228== malloc/free: in use at exit: 156 bytes in 11 blocks.
==9228== malloc/free: 65 allocs, 54 frees, 6238 bytes allocated.
==9228==
==9228== searching for pointers to 11 not-freed blocks.
==9228== checked 73728 bytes.
==9228==
==9228==
==9228== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely
lost in loss record 11 of 11
==9228==    at 0x1B90459D: malloc (vg_replace_malloc.c:130)
==9228==    by 0x1B9D1268: nss_parse_service_list (nsswitch.c:530)
==9228==    by 0x1B9D0AD8: __nss_database_lookup (nsswitch.c:134)
==9228==    by 0x1BB2D36B: ???
==9228==    by 0x1BB2EF34: ???
==9228==    by 0x1B98FB63: getpwuid_r@@GLIBC_2.1.2 (getXXbyYY_r.c:207)
==9228==    by 0x1B98F5DE: getpwuid (getXXbyYY.c:103)
==9228==    by 0x80483DF: main (in /tmp/a.out)
==9228==
==9228== LEAK SUMMARY:
==9228==    definitely lost: 36 bytes in 1 blocks.
==9228==    indirectly lost: 120 bytes in 10 blocks.
==9228==      possibly lost: 0 bytes in 0 blocks.
==9228==    still reachable: 0 bytes in 0 blocks.
==9228==         suppressed: 0 bytes in 0 blocks.
==9228== Reachable blocks (those to which a pointer was found) are not
shown.
==9228== To see them, rerun with: --show-reachable=yes
--9228--     TT/TC: 0 tc sectors discarded.
--9228--            3281 tt_fast misses.
--9228-- translate: new     3060 (48497 -> 680449; ratio 140:10)
--9228--            discard 209 (2457 -> 35488; ratio 144:10).
--9228-- chainings: 2105 chainings, 0 unchainings.
--9228--  dispatch: 82188 jumps (bb entries); of them 10022 (12%)
unchained.
--9228--            2/3524 major/minor sched events.
--9228-- reg-alloc: 559 t-req-spill, 122895+3998 orig+spill uis,
--9228--            15957 total-reg-rank
--9228--    sanity: 3 cheap, 1 expensive checks.
--9228--    ccalls: 11226 C calls, 55% saves+restores avoided (36592
bytes)
--9228--            14922 args, avg 0.87 setup instrs each (3834 bytes)
--9228--            0% clear the stack (33678 bytes)
--9228--            4776 retvals, 31% of reg-reg movs avoided (2886
bytes)




Reply to: