Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-11-12
12:31 • Closed ticket [3387084fff]: leaks in getting pwd, grp plus 6 other changes artifact: 84359e3f69 user: dkf
2011-08-20
03:45 • Pending ticket [3387084fff]. artifact: fbb11f2f74 user: dgp
03:45 • Ticket [3387084fff]: 4 changes artifact: 09538e402b user: dgp
2011-08-15
20:09 • Ticket [3387084fff]: 4 changes artifact: c6f11420fc user: msofer
20:09 • Add attachment output.txt to ticket [3387084fff] artifact: 00487ccdd6 user: msofer
20:08 • Open ticket [3387084fff]: leaks in getting pwd, grp plus 5 other changes artifact: 1d4f733d5e user: msofer
19:50 • Pending ticket [3387084fff]. artifact: de37e07c3b user: dgp
2011-08-06
07:04 • Ticket [3387084fff]: 4 changes artifact: ea2f9ac243 user: msofer
00:03 • New ticket [3387084fff]. artifact: e756437192 user: msofer

leaks in getting pwd, grp

Closed / Works For Me3387084fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 13 years ago
Descriptionplain2011-08-06 00:03:21
  0:  malloc (vg_replace_malloc.c:236)
  1:  nss_parse_service_list (nsswitch.c:622)
  2:  __nss_database_lookup (nsswitch.c:164)
  3:  ???
  4:  ???
  5:  getgrgid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:253)
  6:  TclpGetGrGid (tclUnixCompat.c:330)
  7:  GetGroupAttribute (tclUnixFCmd.c:1330)
  8:  NativeFileAttrsGet (tclIOUtil.c:2293)
  9:  Tcl_FSFileAttrsGet (tclIOUtil.c:2471)
-- cmdAH.test: ==21234== 300 (60 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 85 of 87
-- fCmd.test: ==21855== 300 (60 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 95 of 99
-- unixFCmd.test: ==23585== 300 (60 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 84 of 86

  0:  malloc (vg_replace_malloc.c:236)
  1:  nss_parse_service_list (nsswitch.c:622)
  2:  __nss_database_lookup (nsswitch.c:164)
  3:  ???
  4:  ???
  5:  getpwuid_r@@GLIBC_2.2.5 (getXXbyYY_r.c:253)
  6:  TclpGetPwUid (tclUnixCompat.c:218)
  7:  TclpSetVariables (tclUnixInit.c:877)
  8:  Tcl_CreateInterp (tclBasic.c:932)
  9:  Tcl_Main (tclMain.c:639)
msoferplain2011-08-06 07:04:15
Forgot to mention: 2nd leak appears in every test
dgpplain2011-08-15 19:50:41
Please confirm these are now out of date,
and no longer leaking. Or offer more complete
reproduction recipe.  Thanks!
msoferplain2011-08-15 20:08:32
CFLAGS=-DPURIFY ./configure --disable-shared --enable-symbols; make test

I still see the leaks on freshly updated trunk:

uname -a
Linux ari 2.6.35-30-generic #56-Ubuntu SMP Mon Jul 11 20:01:08 UTC 2011 x86_64 GNU/Linux

/usr/bin/valgrind --leak-check=yes --num-callers=10 ./tcltest ../tests/cmdAH.test
produces output.txt (attached)
msoferplain2011-08-15 20:09:35
File Added - 421165: output.txt
dgpplain2011-08-20 03:45:42
I still can't reproduce these.  Looking
at the stack traces, could valgrind be
pointing out problems in the glibc of
your system?
dgp Pending ticket [3387084fff]. [History diff]2011-08-20 03:45:43
dkf Closed ticket [3387084fff]. [History diff]2013-11-12 12:31:33
Log in (anonymous is fine) to add a comment.

Attachments: