Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Mem leak



hi!

I link zsh (3.1.2 + some patches on jobs.c) with purify 
and found 2 memory leaks

attachment is purify's log


-- 
Thanks,
  Andrei ( tandr@xxxxxxx )
****  Purify instrumented ./zsh (pid 11256 at Tue Jun 24 10:27:21 1997)
  * Purify 4.0.1 Solaris 2, Copyright (C) 1992-1996 Pure Atria Corp. All rights reserved. 
  * For contact information type: "purify -help"
  * For TTY output, use the option "-windows=no"
  * Command-line: ./zsh 
  * Options settings: -freeze-on-error=yes -cache-dir=/tmp/purify-cache \
    -chain-length=30 -best-effort -show-directory=yes -purify \
    -purify-home=/ptibig5/pure/purify-4.0.1-solaris2 
PureLA: 2 simple licenses, 10 users.  Please remedy.
  * Purify licensed to Parametric Technology Israel
  * Purify checking enabled.

****  Purify instrumented ./zsh (pid 11256)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	tparm          [/usr/ccs/lib/libtermcap.a]
	tcoutarg       [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:918]
	tc_rightcurs   [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:847]
	moveto         [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:813]
	refresh        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:269]
	refresh        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:521]
	zleread        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_main.c:451]
	inputline      [/home/tandr/tmp/zsh-3.1.2/Src/input.c:230]
	ingetc         [/home/tandr/tmp/zsh-3.1.2/Src/input.c:186]
	hgetc          [/home/tandr/tmp/zsh-3.1.2/Src/hist.c:119]
	gettok         [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:418]
	yylex          [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:181]
	parse_event    [/home/tandr/tmp/zsh-3.1.2/Src/parse.c:60]
	loop           [/home/tandr/tmp/zsh-3.1.2/Src/init.c:61]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:81]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
  * Reading 4 bytes from 0xefffe368 on the stack.
  * Address 0xefffe368 is 40 bytes below frame pointer in function tparm.

****  Purify instrumented ./zsh (pid 11256)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
	tparm          [/usr/ccs/lib/libtermcap.a]
	tcoutarg       [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:918]
	tc_rightcurs   [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:847]
	moveto         [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:813]
	refresh        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:500]
	refresh        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:521]
	zleread        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_main.c:451]
	inputline      [/home/tandr/tmp/zsh-3.1.2/Src/input.c:230]
	ingetc         [/home/tandr/tmp/zsh-3.1.2/Src/input.c:186]
	hgetc          [/home/tandr/tmp/zsh-3.1.2/Src/hist.c:119]
	gettok         [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:418]
	yylex          [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:181]
	parse_event    [/home/tandr/tmp/zsh-3.1.2/Src/parse.c:60]
	loop           [/home/tandr/tmp/zsh-3.1.2/Src/init.c:61]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:81]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
  * Reading 4 bytes from 0xefffe368 on the stack.
  * Address 0xefffe368 is 40 bytes below frame pointer in function tparm.

****  Purify instrumented ./zsh (pid 11256)  ****
SIG: Signal handled:
  * This is occurring while in:
	_p1062static   [/opt/SUNWspro/SC4.0/lib/crtn.o]
	getkey         [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_main.c:265]
	getkeybuf      [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_keymap.c:1152]
	getkeymapcmd   [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_keymap.c:1119]
	getkeycmd      [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_keymap.c:1188]
	zleread        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_main.c:422]
	inputline      [/home/tandr/tmp/zsh-3.1.2/Src/input.c:230]
	ingetc         [/home/tandr/tmp/zsh-3.1.2/Src/input.c:186]
	hgetc          [/home/tandr/tmp/zsh-3.1.2/Src/hist.c:119]
	gettok         [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:418]
	yylex          [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:181]
	parse_event    [/home/tandr/tmp/zsh-3.1.2/Src/parse.c:60]
	loop           [/home/tandr/tmp/zsh-3.1.2/Src/init.c:61]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:81]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
  * Received signal 2 (SIGINT - Interrupt)
  * Signal mask: (SIGINT) 
  * Pending signals: 

****  Purify instrumented ./zsh (pid 11256)  ****
Current file descriptors in use: 13
FIU: file descriptor 0: <stdin>
FIU: file descriptor 1: <stdout>
FIU: file descriptor 2: <stderr>
FIU: file descriptor 3: "/etc/.name_service_door", O_RDONLY
   * File info: ?r--r--r--  1 root     root             0 Mar 17 15:57
   * This file descriptor was allocated from:
	open           [/usr/lib/libc.so.1]
	_nsc_trydoorcall [/usr/lib/libc.so.1]
	getpwuid_r     [/usr/lib/libc.so.1]
	setupvals      [/home/tandr/tmp/zsh-3.1.2/Src/init.c:492]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:72]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
FIU: file descriptor 4: <inherited from parent>
FIU: file descriptor 5: <inherited from parent>
FIU: file descriptor 6: <inherited from parent>
FIU: file descriptor 7: <inherited from parent>
FIU: file descriptor 8: <inherited from parent>
FIU: file descriptor 10: "/home/tandr/.zaliases", O_RDONLY
   * Duplication of file descriptor 9.
   * File info: crw--w----  1 tandr    tty              0 Jun 24 10:27
   * File position: 205547
   * This file descriptor was allocated from:
	fcntl          [/usr/lib/libc.so.1]
	movefd         [/home/tandr/tmp/zsh-3.1.2/Src/utils.c:820]
	source         [/home/tandr/tmp/zsh-3.1.2/Src/init.c:700]
	bin_dot        [/home/tandr/tmp/zsh-3.1.2/Src/builtin.c:2617]
	execbuiltin    [/home/tandr/tmp/zsh-3.1.2/Src/builtin.c:195]
	execcmd        [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:1698]
	execpline2     [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:808]
	execpline      [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:653]
	execlist       [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:533]
	execif         [/home/tandr/tmp/zsh-3.1.2/Src/loop.c:365]
	execcmd        [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:1651]
	execpline2     [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:808]
	execpline      [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:653]
	execlist       [/home/tandr/tmp/zsh-3.1.2/Src/exec.c:533]
	loop           [/home/tandr/tmp/zsh-3.1.2/Src/init.c:72]
	source         [/home/tandr/tmp/zsh-3.1.2/Src/init.c:722]
	sourcehome     [/home/tandr/tmp/zsh-3.1.2/Src/init.c:759]
	run_init_scripts [/home/tandr/tmp/zsh-3.1.2/Src/init.c:652]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:76]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
FIU: file descriptor 11: <unknown>
FIU: file descriptor 26: <reserved for Purify internal use>
FIU: file descriptor 27: <reserved for Purify internal use>

****  Purify instrumented ./zsh (pid 11256)  ****
Purify: Searching for all memory leaks...

Memory leaked: 5002 bytes (3.79%); potentially leaked: 0 bytes (0%)

MLK: 3992 bytes leaked in 124 blocks
  * This memory was allocated from:
	malloc         [/home/tandr/tmp/zsh-3.1.2/Src/rtlib.o]
	zalloc         [/home/tandr/tmp/zsh-3.1.2/Src/mem.c:378]
	listmatches    [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_tricky.c:3571]
	refresh        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_refresh.c:519]
	zleread        [/home/tandr/tmp/zsh-3.1.2/Src/Zle/zle_main.c:451]
	inputline      [/home/tandr/tmp/zsh-3.1.2/Src/input.c:230]
	ingetc         [/home/tandr/tmp/zsh-3.1.2/Src/input.c:186]
	hgetc          [/home/tandr/tmp/zsh-3.1.2/Src/hist.c:119]
	gettok         [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:418]
	yylex          [/home/tandr/tmp/zsh-3.1.2/Src/lex.c:181]
	parse_event    [/home/tandr/tmp/zsh-3.1.2/Src/parse.c:60]
	loop           [/home/tandr/tmp/zsh-3.1.2/Src/init.c:61]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:81]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
  * Block of 58 bytes at 0x2ce910
  * Block of 41 bytes (2 times); last block at 0x2ff1e0
  * Block of 40 bytes (2 times); last block at 0x2ffb68
  * Block of 39 bytes (2 times); last block at 0x300bd0
  * Block of 38 bytes (6 times); last block at 0x3012c0
  * Block of 37 bytes (4 times); last block at 0x2ffe08
  * Block of 36 bytes (14 times); last block at 0x302088
  * Block of 35 bytes (17 times); last block at 0x302400
  * Block of 34 bytes (8 times); last block at 0x300e70
  * Block of 33 bytes (21 times); last block at 0x302698
  * Block of 32 bytes (11 times); last block at 0x3024e0
  * Block of 31 bytes (8 times); last block at 0x302248
  * Block of 30 bytes (5 times); last block at 0x3019a0
  * Block of 29 bytes (10 times); last block at 0x301b58
  * Block of 28 bytes (3 times); last block at 0x3011e8
  * Block of 15 bytes (4 times); last block at 0x2cd698
  * Block of 13 bytes (2 times); last block at 0x2cd3e8
  * Block of 12 bytes (3 times); last block at 0x2cd828
  * Block of 8 bytes at 0x2a6ef8

MLK: 1010 bytes leaked in 2 blocks
  * This memory was allocated from:
	malloc         [/home/tandr/tmp/zsh-3.1.2/Src/rtlib.o]
	zalloc         [/home/tandr/tmp/zsh-3.1.2/Src/mem.c:378]
	metafy         [/home/tandr/tmp/zsh-3.1.2/Src/utils.c:2655]
	createparamtable [/home/tandr/tmp/zsh-3.1.2/Src/params.c:116]
	setupvals      [/home/tandr/tmp/zsh-3.1.2/Src/init.c:520]
	main           [/home/tandr/tmp/zsh-3.1.2/Src/main.c:72]
	_start         [/opt/SUNWspro/SC4.0/lib/crt1.o]
  * Block of 693 bytes at 0x2114f8
  * Block of 317 bytes at 0x217c70

Purify Heap Analysis (combining suppressed and unsuppressed blocks)
                         Blocks      Bytes
              Leaked        126       5002
  Potentially Leaked          0          0
              In-Use       4589     126875
  ----------------------------------------
     Total Allocated       4715     131877

****  Purify instrumented ./zsh (pid 11256)  ****
  * Program exited with status code 0.
  * 3 access errors, 3 total occurrences.
  * 5002 bytes leaked.
  * 0 bytes potentially leaked.
  * Basic memory usage (including Purify overhead):
     1742356 code
      170460 data/bss
     1114112 heap (peak use)
        6856 stack
  * Shared library memory usage (including Purify overhead):
      610562 libnsl.so.1_pure_p3_c0_401_55 (shared code)
       64764 libnsl.so.1_pure_p3_c0_401_55 (private data)
      802467 libc.so.1_pure_p3_c0_401_55 (shared code)
       33636 libc.so.1_pure_p3_c0_401_55 (private data)
        1200 libdl.so.1_pure_p3_c0_401_55 (shared code)
           0 libdl.so.1_pure_p3_c0_401_55 (private data)
        2729 libinternal_stubs.so.1 (shared code)
         208 libinternal_stubs.so.1 (private data)
       14029 libintl.so.1_pure_p3_c0_401_55 (shared code)
        3680 libintl.so.1_pure_p3_c0_401_55 (private data)
       16088 libmp.so.1_pure_p3_c0_401_55 (shared code)
         828 libmp.so.1_pure_p3_c0_401_55 (private data)
       37341 libw.so.1_pure_p3_c0_401_55 (shared code)
        1612 libw.so.1_pure_p3_c0_401_55 (private data)



Messages sorted by: Reverse Date, Date, Thread, Author