zsh-workers
 help / color / mirror / code / Atom feed
* coredump completing scp
@ 2011-01-28  3:13 Vin Shelton
  2011-01-28  3:30 ` Bart Schaefer
  0 siblings, 1 reply; 11+ messages in thread
From: Vin Shelton @ 2011-01-28  3:13 UTC (permalink / raw)
  To: zsh-workers

With a recent CVS build (ZSH_PATCHLEVEL is 1.5190), here's a recipe
for an abort:

zsh -f
autoload -U compinit
compinit -u
scp <TAB>

This shell was configured --with-zsh-mem and that seems to be required
to provoke the coredump.

Here is the backtrace:

Core was generated by `/home/acs/tst/bin/zsh -f'.
Program terminated with signal 6, Aborted.
#0  0x00007fd2d8aeb9e5 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007fd2d8aeb9e5 in raise () from /lib64/libc.so.6
#1  0x00007fd2d8aecee6 in abort () from /lib64/libc.so.6
#2  0x00007fd2d8b26c53 in __libc_message () from /lib64/libc.so.6
#3  0x00007fd2d8b2c226 in malloc_printerr () from /lib64/libc.so.6
#4  0x00007fd2d8b30fcc in free () from /lib64/libc.so.6
#5  0x00007fd2d79edd4a in init () from /lib64/libnsl.so.1
#6  0x00007fd2d79ede7a in _nsl_default_nss () from /lib64/libnsl.so.1
#7  0x00007fd2d77d8301 in _nss_nis_setpwent () from /lib64/libnss_nis.so.2
#8  0x00007fd2d7bf8558 in internal_setpwent () from /lib64/libnss_compat.so.2
#9  0x00007fd2d7bf9896 in _nss_compat_setpwent () from /lib64/libnss_compat.so.2
#10 0x00007fd2d8b9ae20 in __nss_setent () from /lib64/libc.so.6
#11 0x00007fd2d8b57ccc in setpwent () from /lib64/libc.so.6
#12 0x000000000043ecb4 in fillnameddirtable (ht=0x6e4b08) at hashtable.c:1382
#13 0x00007fd2d8224131 in scanpmuserdirs (ht=0x7837c8, func=0x46a5be
<scancountparams>, flags=34)
    at parameter.c:1471
#14 0x000000000043d33a in scanmatchtable (ht=0x7837c8, pprog=0x0,
sorted=0, flags1=0,
    flags2=33554432, scanfunc=0x46a5be <scancountparams>,
scanflags=34) at hashtable.c:381
#15 0x000000000043d631 in scanhashtable (ht=0x7837c8, sorted=0,
flags1=0, flags2=33554432,
    scanfunc=0x46a5be <scancountparams>, scanflags=34) at hashtable.c:444
#16 0x000000000046a86f in paramvalarr (ht=0x7837c8, flags=34) at params.c:584
#17 0x000000000046a992 in getvaluearr (v=0x7fff231452c0) at params.c:606
#18 0x000000000046ea34 in getarrvalue (v=0x7fff231452c0) at params.c:2140
#19 0x00007fd2d864dca9 in get_data_arr (name=0x7fd2d96dcdf0 "",
keys=64) at compcore.c:1952
#20 0x00007fd2d864f8cb in addmatches (dat=0x7fff23145600, argv=0x0) at
compcore.c:2365
#21 0x00007fd2d86469b1 in bin_compadd (name=0x7fd2d96dcc80 "compadd",
argv=0x7fff23145728,
    ops=0x7fff23145760, func=0) at complete.c:742
#22 0x00000000004109cf in execbuiltin (args=0x7fd2d96dcaf0,
bn=0x7fd2d8865c20) at builtin.c:450
#23 0x0000000000430849 in execcmd (state=0x7fff23146db0, input=0,
output=0, how=2, last1=2)
    at exec.c:3173
#24 0x000000000042c0b0 in execpline2 (state=0x7fff23146db0,
pcode=2563, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#25 0x000000000042b21a in execpline (state=0x7fff23146db0,
slcode=5154, how=2, last1=0)
    at exec.c:1416
#26 0x000000000042a912 in execlist (state=0x7fff23146db0,
dont_change_job=1, exiting=0)
    at exec.c:1207
#27 0x0000000000458b9b in execif (state=0x7fff23146db0, do_exec=0) at loop.c:515
#28 0x00000000004305c2 in execcmd (state=0x7fff23146db0, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#29 0x000000000042c0b0 in execpline2 (state=0x7fff23146db0,
pcode=1987, how=18, input=0, output=0,
    last1=0) at exec.c:1632
#30 0x000000000042b21a in execpline (state=0x7fff23146db0,
slcode=70658, how=18, last1=0)
    at exec.c:1416
#31 0x000000000042a8cc in execlist (state=0x7fff23146db0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#32 0x00000000004587e0 in execwhile (state=0x7fff23146db0, do_exec=0)
at loop.c:410
#33 0x00000000004305c2 in execcmd (state=0x7fff23146db0, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#34 0x000000000042c0b0 in execpline2 (state=0x7fff23146db0,
pcode=1731, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#35 0x000000000042b21a in execpline (state=0x7fff23146db0,
slcode=107522, how=2, last1=0)
    at exec.c:1416
#36 0x000000000042a8cc in execlist (state=0x7fff23146db0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#37 0x000000000042a33e in execode (p=0x70adc8, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#38 0x0000000000433cad in runshfunc (prog=0x70adc8, wrap=0x0,
name=0x7fd2d96dc0d0 "_all_labels")
    at exec.c:4608
#39 0x00007fd2d8648237 in comp_wrapper (prog=0x70adc8, w=0x0,
name=0x7fd2d96dc0d0 "_all_labels")
    at complete.c:1455
#40 0x0000000000433c12 in runshfunc (prog=0x70adc8, wrap=0x7fd2d8865d80,
    name=0x7fd2d96dc0d0 "_all_labels") at exec.c:4593
#41 0x0000000000433984 in doshfunc (shfunc=0x70ba40,
doshargs=0x7fd2d96dbec8, noreturnval=0)
    at exec.c:4502
#42 0x0000000000433046 in execshfunc (shf=0x70ba40,
args=0x7fd2d96dbec8) at exec.c:4230
#43 0x00000000004307b7 in execcmd (state=0x7fff23147f70, input=0,
output=0, how=2, last1=2)
    at exec.c:3162
#44 0x000000000042c0b0 in execpline2 (state=0x7fff23147f70, pcode=707,
how=2, input=0, output=0,
    last1=0) at exec.c:1632
#45 0x000000000042b21a in execpline (state=0x7fff23147f70,
slcode=5154, how=2, last1=0)
    at exec.c:1416
---Type <return> to continue, or q <return> to quit---
#46 0x000000000042a912 in execlist (state=0x7fff23147f70,
dont_change_job=1, exiting=0)
    at exec.c:1207
#47 0x00000000004587e0 in execwhile (state=0x7fff23147f70, do_exec=0)
at loop.c:410
#48 0x00000000004305c2 in execcmd (state=0x7fff23147f70, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#49 0x000000000042c0b0 in execpline2 (state=0x7fff23147f70, pcode=643,
how=2, input=0, output=0,
    last1=0) at exec.c:1632
#50 0x000000000042b21a in execpline (state=0x7fff23147f70,
slcode=19458, how=2, last1=0)
    at exec.c:1416
#51 0x000000000042a8cc in execlist (state=0x7fff23147f70,
dont_change_job=1, exiting=0)
    at exec.c:1199
#52 0x000000000042a33e in execode (p=0x70ae70, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#53 0x0000000000433cad in runshfunc (prog=0x70ae70, wrap=0x0,
name=0x7fd2d96db9f0 "_wanted")
    at exec.c:4608
#54 0x00007fd2d8648237 in comp_wrapper (prog=0x70ae70, w=0x0,
name=0x7fd2d96db9f0 "_wanted")
    at complete.c:1455
#55 0x0000000000433c12 in runshfunc (prog=0x70ae70, wrap=0x7fd2d8865d80,
    name=0x7fd2d96db9f0 "_wanted") at exec.c:4593
#56 0x0000000000433984 in doshfunc (shfunc=0x743ff0,
doshargs=0x7fd2d96db850, noreturnval=0)
    at exec.c:4502
#57 0x0000000000433046 in execshfunc (shf=0x743ff0,
args=0x7fd2d96db850) at exec.c:4230
#58 0x00000000004307b7 in execcmd (state=0x7fff23148a10, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#59 0x000000000042c0b0 in execpline2 (state=0x7fff23148a10, pcode=707,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#60 0x000000000042b21a in execpline (state=0x7fff23148a10,
slcode=11266, how=18, last1=0)
    at exec.c:1416
#61 0x000000000042a8cc in execlist (state=0x7fff23148a10,
dont_change_job=1, exiting=0)
    at exec.c:1199
#62 0x000000000042a33e in execode (p=0x737768, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#63 0x0000000000433160 in execautofn (state=0x7fff23149180, do_exec=0)
at exec.c:4266
#64 0x00000000004305c2 in execcmd (state=0x7fff23149180, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#65 0x000000000042c0b0 in execpline2 (state=0x7fff23149180, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#66 0x000000000042b21a in execpline (state=0x7fff23149180,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#67 0x000000000042a8cc in execlist (state=0x7fff23149180,
dont_change_job=1, exiting=0)
    at exec.c:1199
#68 0x000000000042a33e in execode (p=0x7436f8, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#69 0x0000000000433cad in runshfunc (prog=0x7436f8, wrap=0x0,
name=0x7fd2d96db688 "_users")
    at exec.c:4608
#70 0x00007fd2d8648237 in comp_wrapper (prog=0x7436f8, w=0x0,
name=0x7fd2d96db688 "_users")
    at complete.c:1455
#71 0x0000000000433c12 in runshfunc (prog=0x7436f8, wrap=0x7fd2d8865d80,
    name=0x7fd2d96db688 "_users") at exec.c:4593
#72 0x0000000000433984 in doshfunc (shfunc=0x7436c0,
doshargs=0x7fd2d96db5c8, noreturnval=0)
    at exec.c:4502
#73 0x0000000000433046 in execshfunc (shf=0x7436c0,
args=0x7fd2d96db5c8) at exec.c:4230
#74 0x00000000004307b7 in execcmd (state=0x7fff2314a330, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#75 0x000000000042c0b0 in execpline2 (state=0x7fff2314a330,
pcode=6531, how=18, input=0, output=0,
    last1=0) at exec.c:1632
#76 0x000000000042b21a in execpline (state=0x7fff2314a330,
slcode=4098, how=18, last1=0)
    at exec.c:1416
#77 0x000000000042a8cc in execlist (state=0x7fff2314a330,
dont_change_job=1, exiting=0)
    at exec.c:1199
#78 0x0000000000458b9b in execif (state=0x7fff2314a330, do_exec=0) at loop.c:515
#79 0x00000000004305c2 in execcmd (state=0x7fff2314a330, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#80 0x000000000042c0b0 in execpline2 (state=0x7fff2314a330,
pcode=5955, how=18, input=0, output=0,
    last1=0) at exec.c:1632
#81 0x000000000042b21a in execpline (state=0x7fff2314a330,
slcode=74754, how=18, last1=0)
    at exec.c:1416
#82 0x000000000042a8cc in execlist (state=0x7fff2314a330,
dont_change_job=1, exiting=0)
    at exec.c:1199
#83 0x000000000042a33e in execode (p=0x735c98, dont_change_job=1, exiting=0,
---Type <return> to continue, or q <return> to quit---
    context=0x4a67e6 "shfunc") at exec.c:1020
#84 0x0000000000433cad in runshfunc (prog=0x735c98, wrap=0x0,
name=0x7fd2d96dae80 "_combination")
    at exec.c:4608
#85 0x00007fd2d8648237 in comp_wrapper (prog=0x735c98, w=0x0,
name=0x7fd2d96dae80 "_combination")
    at complete.c:1455
#86 0x0000000000433c12 in runshfunc (prog=0x735c98, wrap=0x7fd2d8865d80,
    name=0x7fd2d96dae80 "_combination") at exec.c:4593
#87 0x0000000000433984 in doshfunc (shfunc=0x714300,
doshargs=0x7fd2d96dad00, noreturnval=0)
    at exec.c:4502
#88 0x0000000000433046 in execshfunc (shf=0x714300,
args=0x7fd2d96dad00) at exec.c:4230
#89 0x00000000004307b7 in execcmd (state=0x7fff2314add0, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#90 0x000000000042c0b0 in execpline2 (state=0x7fff2314add0, pcode=131,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#91 0x000000000042b21a in execpline (state=0x7fff2314add0,
slcode=9218, how=18, last1=0)
    at exec.c:1416
#92 0x000000000042a8cc in execlist (state=0x7fff2314add0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#93 0x000000000042a33e in execode (p=0x741640, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#94 0x0000000000433cad in runshfunc (prog=0x741640, wrap=0x0,
name=0x7fd2d96dace8 "_ssh_users")
    at exec.c:4608
#95 0x00007fd2d8648237 in comp_wrapper (prog=0x741640, w=0x0,
name=0x7fd2d96dace8 "_ssh_users")
    at complete.c:1455
#96 0x0000000000433c12 in runshfunc (prog=0x741640, wrap=0x7fd2d8865d80,
    name=0x7fd2d96dace8 "_ssh_users") at exec.c:4593
#97 0x0000000000433984 in doshfunc (shfunc=0x7403b8,
doshargs=0x7fd2d96dab10, noreturnval=0)
    at exec.c:4502
#98 0x0000000000433046 in execshfunc (shf=0x7403b8,
args=0x7fd2d96dab10) at exec.c:4230
#99 0x00000000004307b7 in execcmd (state=0x7fff2314dc60, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#100 0x000000000042c0b0 in execpline2 (state=0x7fff2314dc60,
pcode=4483, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#101 0x000000000042b21a in execpline (state=0x7fff2314dc60,
slcode=6146, how=18, last1=0)
    at exec.c:1416
#102 0x000000000042a8cc in execlist (state=0x7fff2314dc60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#103 0x00000000004587e0 in execwhile (state=0x7fff2314dc60, do_exec=0)
at loop.c:410
#104 0x00000000004305c2 in execcmd (state=0x7fff2314dc60, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#105 0x000000000042c0b0 in execpline2 (state=0x7fff2314dc60,
pcode=4419, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#106 0x000000000042b21a in execpline (state=0x7fff2314dc60,
slcode=18434, how=18, last1=0)
    at exec.c:1416
#107 0x000000000042a8cc in execlist (state=0x7fff2314dc60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#108 0x0000000000458b9b in execif (state=0x7fff2314dc60, do_exec=0) at
loop.c:515
#109 0x00000000004305c2 in execcmd (state=0x7fff2314dc60, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#110 0x000000000042c0b0 in execpline2 (state=0x7fff2314dc60,
pcode=1987, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#111 0x000000000042b21a in execpline (state=0x7fff2314dc60,
slcode=147458, how=18, last1=0)
    at exec.c:1416
#112 0x000000000042a8cc in execlist (state=0x7fff2314dc60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#113 0x0000000000458b9b in execif (state=0x7fff2314dc60, do_exec=0) at
loop.c:515
#114 0x00000000004305c2 in execcmd (state=0x7fff2314dc60, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#115 0x000000000042c0b0 in execpline2 (state=0x7fff2314dc60,
pcode=1603, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#116 0x000000000042b21a in execpline (state=0x7fff2314dc60,
slcode=179202, how=18, last1=0)
    at exec.c:1416
#117 0x000000000042a8cc in execlist (state=0x7fff2314dc60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#118 0x0000000000457cef in execfor (state=0x7fff2314dc60, do_exec=0)
at loop.c:159
#119 0x00000000004305c2 in execcmd (state=0x7fff2314dc60, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#120 0x000000000042c0b0 in execpline2 (state=0x7fff2314dc60,
pcode=1539, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#121 0x000000000042b21a in execpline (state=0x7fff2314dc60,
slcode=185346, how=2, last1=0)
---Type <return> to continue, or q <return> to quit---
    at exec.c:1416
#122 0x000000000042a8cc in execlist (state=0x7fff2314dc60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#123 0x00000000004587e0 in execwhile (state=0x7fff2314dc60, do_exec=0)
at loop.c:410
#124 0x00000000004305c2 in execcmd (state=0x7fff2314dc60, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#125 0x000000000042c0b0 in execpline2 (state=0x7fff2314dc60,
pcode=1475, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#126 0x000000000042b21a in execpline (state=0x7fff2314dc60,
slcode=205826, how=2, last1=0)
    at exec.c:1416
#127 0x000000000042a8cc in execlist (state=0x7fff2314dc60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#128 0x000000000042a33e in execode (p=0x70b0a0, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#129 0x0000000000433160 in execautofn (state=0x7fff2314e3d0,
do_exec=0) at exec.c:4266
#130 0x00000000004305c2 in execcmd (state=0x7fff2314e3d0, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#131 0x000000000042c0b0 in execpline2 (state=0x7fff2314e3d0, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#132 0x000000000042b21a in execpline (state=0x7fff2314e3d0,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#133 0x000000000042a8cc in execlist (state=0x7fff2314e3d0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#134 0x000000000042a33e in execode (p=0x70bb20, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#135 0x0000000000433cad in runshfunc (prog=0x70bb20, wrap=0x0,
name=0x7fd2d96d9d40 "_alternative")
    at exec.c:4608
#136 0x00007fd2d8648237 in comp_wrapper (prog=0x70bb20, w=0x0,
name=0x7fd2d96d9d40 "_alternative")
    at complete.c:1455
#137 0x0000000000433c12 in runshfunc (prog=0x70bb20, wrap=0x7fd2d8865d80,
    name=0x7fd2d96d9d40 "_alternative") at exec.c:4593
#138 0x0000000000433984 in doshfunc (shfunc=0x70bae8,
doshargs=0x7fd2d96d9c40, noreturnval=0)
    at exec.c:4502
#139 0x0000000000433046 in execshfunc (shf=0x70bae8,
args=0x7fd2d96d9c40) at exec.c:4230
#140 0x00000000004307b7 in execcmd (state=0x7fff231503f0, input=0,
output=0, how=2, last1=2)
    at exec.c:3162
#141 0x000000000042c0b0 in execpline2 (state=0x7fff231503f0,
pcode=16963, how=2, input=0,
    output=0, last1=0) at exec.c:1632
#142 0x000000000042b21a in execpline (state=0x7fff231503f0,
slcode=6178, how=2, last1=0)
    at exec.c:1416
#143 0x000000000042a912 in execlist (state=0x7fff231503f0,
dont_change_job=1, exiting=0)
    at exec.c:1207
#144 0x0000000000458b9b in execif (state=0x7fff231503f0, do_exec=0) at
loop.c:515
#145 0x00000000004305c2 in execcmd (state=0x7fff231503f0, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#146 0x000000000042c0b0 in execpline2 (state=0x7fff231503f0,
pcode=16515, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#147 0x000000000042b21a in execpline (state=0x7fff231503f0,
slcode=83970, how=18, last1=0)
    at exec.c:1416
#148 0x000000000042a8cc in execlist (state=0x7fff231503f0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#149 0x0000000000458f62 in execcase (state=0x7fff231503f0, do_exec=0)
at loop.c:593
#150 0x00000000004305c2 in execcmd (state=0x7fff231503f0, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#151 0x000000000042c0b0 in execpline2 (state=0x7fff231503f0,
pcode=7811, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#152 0x000000000042b21a in execpline (state=0x7fff231503f0,
slcode=780290, how=18, last1=0)
    at exec.c:1416
#153 0x000000000042a8cc in execlist (state=0x7fff231503f0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#154 0x00000000004587e0 in execwhile (state=0x7fff231503f0, do_exec=0)
at loop.c:410
#155 0x00000000004305c2 in execcmd (state=0x7fff231503f0, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#156 0x000000000042c0b0 in execpline2 (state=0x7fff231503f0,
pcode=7555, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#157 0x000000000042b21a in execpline (state=0x7fff231503f0,
slcode=800770, how=18, last1=0)
    at exec.c:1416
#158 0x000000000042a8cc in execlist (state=0x7fff231503f0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#159 0x000000000042a33e in execode (p=0x70b3b0, dont_change_job=1, exiting=0,
---Type <return> to continue, or q <return> to quit---
    context=0x4a67e6 "shfunc") at exec.c:1020
#160 0x0000000000433cad in runshfunc (prog=0x70b3b0, wrap=0x0,
name=0x7fd2d96e0ff8 "_ssh")
    at exec.c:4608
#161 0x00007fd2d8648237 in comp_wrapper (prog=0x70b3b0, w=0x0,
name=0x7fd2d96e0ff8 "_ssh")
    at complete.c:1455
#162 0x0000000000433c12 in runshfunc (prog=0x70b3b0, wrap=0x7fd2d8865d80,
    name=0x7fd2d96e0ff8 "_ssh") at exec.c:4593
#163 0x0000000000433984 in doshfunc (shfunc=0x70b378,
doshargs=0x7fd2d96e0f90, noreturnval=0)
    at exec.c:4502
#164 0x0000000000433046 in execshfunc (shf=0x70b378,
args=0x7fd2d96e0f90) at exec.c:4230
#165 0x00000000004307b7 in execcmd (state=0x7fff23150e90, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#166 0x000000000042c0b0 in execpline2 (state=0x7fff23150e90,
pcode=23171, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#167 0x000000000042b21a in execpline (state=0x7fff23150e90,
slcode=4098, how=18, last1=0)
    at exec.c:1416
#168 0x000000000042a8cc in execlist (state=0x7fff23150e90,
dont_change_job=1, exiting=0)
    at exec.c:1199
#169 0x000000000042a33e in execode (p=0x70b458, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#170 0x0000000000433160 in execautofn (state=0x7fff23151600,
do_exec=0) at exec.c:4266
#171 0x00000000004305c2 in execcmd (state=0x7fff23151600, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#172 0x000000000042c0b0 in execpline2 (state=0x7fff23151600, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#173 0x000000000042b21a in execpline (state=0x7fff23151600,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#174 0x000000000042a8cc in execlist (state=0x7fff23151600,
dont_change_job=1, exiting=0)
    at exec.c:1199
#175 0x000000000042a33e in execode (p=0x741678, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#176 0x0000000000433cad in runshfunc (prog=0x741678, wrap=0x0,
name=0x7fd2d96e0e88 "_ssh")
    at exec.c:4608
#177 0x00007fd2d8648237 in comp_wrapper (prog=0x741678, w=0x0,
name=0x7fd2d96e0e88 "_ssh")
    at complete.c:1455
#178 0x0000000000433c12 in runshfunc (prog=0x741678, wrap=0x7fd2d8865d80,
    name=0x7fd2d96e0e88 "_ssh") at exec.c:4593
#179 0x0000000000433984 in doshfunc (shfunc=0x741640,
doshargs=0x7fd2d96e0e48, noreturnval=0)
    at exec.c:4502
#180 0x0000000000433046 in execshfunc (shf=0x741640,
args=0x7fd2d96e0e48) at exec.c:4230
#181 0x00000000004307b7 in execcmd (state=0x7fff231520a0, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#182 0x000000000042c0b0 in execpline2 (state=0x7fff231520a0,
pcode=131, how=18, input=0, output=0,
    last1=0) at exec.c:1632
#183 0x000000000042b21a in execpline (state=0x7fff231520a0,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#184 0x000000000042a8cc in execlist (state=0x7fff231520a0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#185 0x000000000042a33e in execode (p=0x7fd2d96e0dd8,
dont_change_job=1, exiting=0,
    context=0x4a49be "eval") at exec.c:1020
#186 0x0000000000422d4e in eval (argv=0x7fff23152180) at builtin.c:4897
#187 0x000000000042306f in bin_eval (nam=0x7fd2d96e0d70 "eval",
argv=0x7fff23152180,
    ops=0x7fff231521b0, func=14) at builtin.c:5006
#188 0x00000000004109cf in execbuiltin (args=0x7fd2d96e0d28,
bn=0x6bcba0) at builtin.c:450
#189 0x0000000000430849 in execcmd (state=0x7fff231530e0, input=0,
output=0, how=2, last1=2)
    at exec.c:3173
#190 0x000000000042c0b0 in execpline2 (state=0x7fff231530e0,
pcode=4099, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#191 0x000000000042b21a in execpline (state=0x7fff231530e0,
slcode=4130, how=2, last1=0)
    at exec.c:1416
#192 0x000000000042a912 in execlist (state=0x7fff231530e0,
dont_change_job=1, exiting=0)
    at exec.c:1207
#193 0x0000000000458b9b in execif (state=0x7fff231530e0, do_exec=0) at
loop.c:515
#194 0x00000000004305c2 in execcmd (state=0x7fff231530e0, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#195 0x000000000042c0b0 in execpline2 (state=0x7fff231530e0,
pcode=3971, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#196 0x000000000042b21a in execpline (state=0x7fff231530e0,
slcode=43010, how=2, last1=0)
    at exec.c:1416
#197 0x000000000042a8cc in execlist (state=0x7fff231530e0,
dont_change_job=1, exiting=0)
---Type <return> to continue, or q <return> to quit---
    at exec.c:1199
#198 0x000000000042a33e in execode (p=0x70b490, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#199 0x0000000000433160 in execautofn (state=0x7fff23153850,
do_exec=0) at exec.c:4266
#200 0x00000000004305c2 in execcmd (state=0x7fff23153850, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#201 0x000000000042c0b0 in execpline2 (state=0x7fff23153850, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#202 0x000000000042b21a in execpline (state=0x7fff23153850,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#203 0x000000000042a8cc in execlist (state=0x7fff23153850,
dont_change_job=1, exiting=0)
    at exec.c:1199
#204 0x000000000042a33e in execode (p=0x732750, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#205 0x0000000000433cad in runshfunc (prog=0x732750, wrap=0x0,
name=0x7fd2d96e0660 "_dispatch")
    at exec.c:4608
#206 0x00007fd2d8648237 in comp_wrapper (prog=0x732750, w=0x0,
name=0x7fd2d96e0660 "_dispatch")
    at complete.c:1455
#207 0x0000000000433c12 in runshfunc (prog=0x732750, wrap=0x7fd2d8865d80,
    name=0x7fd2d96e0660 "_dispatch") at exec.c:4593
#208 0x0000000000433984 in doshfunc (shfunc=0x732718,
doshargs=0x7fd2d96e04e8, noreturnval=0)
    at exec.c:4502
#209 0x0000000000433046 in execshfunc (shf=0x732718,
args=0x7fd2d96e04e8) at exec.c:4230
#210 0x00000000004307b7 in execcmd (state=0x7fff231542f0, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#211 0x000000000042c0b0 in execpline2 (state=0x7fff231542f0,
pcode=2627, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#212 0x000000000042b21a in execpline (state=0x7fff231542f0,
slcode=8194, how=18, last1=0)
    at exec.c:1416
#213 0x000000000042a8cc in execlist (state=0x7fff231542f0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#214 0x000000000042a33e in execode (p=0x70b500, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#215 0x0000000000433160 in execautofn (state=0x7fff23154a60,
do_exec=0) at exec.c:4266
#216 0x00000000004305c2 in execcmd (state=0x7fff23154a60, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#217 0x000000000042c0b0 in execpline2 (state=0x7fff23154a60, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#218 0x000000000042b21a in execpline (state=0x7fff23154a60,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#219 0x000000000042a8cc in execlist (state=0x7fff23154a60,
dont_change_job=1, exiting=0)
    at exec.c:1199
#220 0x000000000042a33e in execode (p=0x73d298, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#221 0x0000000000433cad in runshfunc (prog=0x73d298, wrap=0x0,
name=0x7fd2d96e01e8 "_normal")
    at exec.c:4608
#222 0x00007fd2d8648237 in comp_wrapper (prog=0x73d298, w=0x0,
name=0x7fd2d96e01e8 "_normal")
    at complete.c:1455
#223 0x0000000000433c12 in runshfunc (prog=0x73d298, wrap=0x7fd2d8865d80,
    name=0x7fd2d96e01e8 "_normal") at exec.c:4593
#224 0x0000000000433984 in doshfunc (shfunc=0x73d260,
doshargs=0x7fd2d96e0188, noreturnval=0)
    at exec.c:4502
#225 0x0000000000433046 in execshfunc (shf=0x73d260,
args=0x7fd2d96e0188) at exec.c:4230
#226 0x00000000004307b7 in execcmd (state=0x7fff23155c10, input=0,
output=0, how=2, last1=2)
    at exec.c:3162
#227 0x000000000042c0b0 in execpline2 (state=0x7fff23155c10,
pcode=7555, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#228 0x000000000042b21a in execpline (state=0x7fff23155c10,
slcode=4130, how=2, last1=0)
    at exec.c:1416
#229 0x000000000042a912 in execlist (state=0x7fff23155c10,
dont_change_job=1, exiting=0)
    at exec.c:1207
#230 0x0000000000458b9b in execif (state=0x7fff23155c10, do_exec=0) at
loop.c:515
#231 0x00000000004305c2 in execcmd (state=0x7fff23155c10, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#232 0x000000000042c0b0 in execpline2 (state=0x7fff23155c10,
pcode=7427, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#233 0x000000000042b21a in execpline (state=0x7fff23155c10,
slcode=114690, how=2, last1=0)
    at exec.c:1416
#234 0x000000000042a8cc in execlist (state=0x7fff23155c10,
dont_change_job=1, exiting=0)
    at exec.c:1199
---Type <return> to continue, or q <return> to quit---
#235 0x000000000042a33e in execode (p=0x7410c8, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#236 0x0000000000433160 in execautofn (state=0x7fff23156380,
do_exec=0) at exec.c:4266
#237 0x00000000004305c2 in execcmd (state=0x7fff23156380, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#238 0x000000000042c0b0 in execpline2 (state=0x7fff23156380, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#239 0x000000000042b21a in execpline (state=0x7fff23156380,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#240 0x000000000042a8cc in execlist (state=0x7fff23156380,
dont_change_job=1, exiting=0)
    at exec.c:1199
#241 0x000000000042a33e in execode (p=0x714568, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
#242 0x0000000000433cad in runshfunc (prog=0x714568, wrap=0x0,
name=0x7fd2d96dfb68 "_complete")
    at exec.c:4608
#243 0x00007fd2d8648237 in comp_wrapper (prog=0x714568, w=0x0,
name=0x7fd2d96dfb68 "_complete")
    at complete.c:1455
#244 0x0000000000433c12 in runshfunc (prog=0x714568, wrap=0x7fd2d8865d80,
    name=0x7fd2d96dfb68 "_complete") at exec.c:4593
#245 0x0000000000433984 in doshfunc (shfunc=0x714530,
doshargs=0x7fd2d96dfb10, noreturnval=0)
    at exec.c:4502
#246 0x0000000000433046 in execshfunc (shf=0x714530,
args=0x7fd2d96dfb10) at exec.c:4230
#247 0x00000000004307b7 in execcmd (state=0x7fff23158450, input=0,
output=0, how=18, last1=2)
    at exec.c:3162
#248 0x000000000042c0b0 in execpline2 (state=0x7fff23158450,
pcode=10627, how=18, input=0,
    output=0, last1=0) at exec.c:1632
#249 0x000000000042b21a in execpline (state=0x7fff23158450,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#250 0x000000000042a8cc in execlist (state=0x7fff23158450,
dont_change_job=1, exiting=0)
    at exec.c:1199
#251 0x0000000000458b00 in execif (state=0x7fff23158450, do_exec=0) at
loop.c:500
#252 0x00000000004305c2 in execcmd (state=0x7fff23158450, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#253 0x000000000042c0b0 in execpline2 (state=0x7fff23158450,
pcode=10307, how=2, input=0,
    output=0, last1=0) at exec.c:1632
#254 0x000000000042b21a in execpline (state=0x7fff23158450,
slcode=48130, how=2, last1=0)
    at exec.c:1416
#255 0x000000000042a8cc in execlist (state=0x7fff23158450,
dont_change_job=1, exiting=0)
    at exec.c:1199
#256 0x0000000000457cef in execfor (state=0x7fff23158450, do_exec=0)
at loop.c:159
#257 0x00000000004305c2 in execcmd (state=0x7fff23158450, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#258 0x000000000042c0b0 in execpline2 (state=0x7fff23158450,
pcode=9795, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#259 0x000000000042b21a in execpline (state=0x7fff23158450,
slcode=90114, how=2, last1=0)
    at exec.c:1416
#260 0x000000000042a8cc in execlist (state=0x7fff23158450,
dont_change_job=1, exiting=0)
    at exec.c:1199
#261 0x0000000000457cef in execfor (state=0x7fff23158450, do_exec=0)
at loop.c:159
#262 0x00000000004305c2 in execcmd (state=0x7fff23158450, input=0,
output=0, how=2, last1=2)
    at exec.c:3114
#263 0x000000000042c0b0 in execpline2 (state=0x7fff23158450,
pcode=8323, how=2, input=0, output=0,
    last1=0) at exec.c:1632
#264 0x000000000042b21a in execpline (state=0x7fff23158450,
slcode=220162, how=2, last1=0)
    at exec.c:1416
#265 0x000000000042a8cc in execlist (state=0x7fff23158450,
dont_change_job=1, exiting=0)
    at exec.c:1199
#266 0x000000000042a33e in execode (p=0x70b618, dont_change_job=1, exiting=0,
    context=0x4a674f "loadautofunc") at exec.c:1020
#267 0x0000000000433160 in execautofn (state=0x7fff23158bc0,
do_exec=0) at exec.c:4266
#268 0x00000000004305c2 in execcmd (state=0x7fff23158bc0, input=0,
output=0, how=18, last1=2)
    at exec.c:3114
#269 0x000000000042c0b0 in execpline2 (state=0x7fff23158bc0, pcode=3,
how=18, input=0, output=0,
    last1=0) at exec.c:1632
#270 0x000000000042b21a in execpline (state=0x7fff23158bc0,
slcode=3074, how=18, last1=0)
    at exec.c:1416
#271 0x000000000042a8cc in execlist (state=0x7fff23158bc0,
dont_change_job=1, exiting=0)
    at exec.c:1199
#272 0x000000000042a33e in execode (p=0x73bc28, dont_change_job=1, exiting=0,
    context=0x4a67e6 "shfunc") at exec.c:1020
---Type <return> to continue, or q <return> to quit---
#273 0x0000000000433cad in runshfunc (prog=0x73bc28, wrap=0x0,
    name=0x7fd2d96dd030 "_main_complete") at exec.c:4608
#274 0x00007fd2d8648237 in comp_wrapper (prog=0x73bc28, w=0x0,
    name=0x7fd2d96dd030 "_main_complete") at complete.c:1455
#275 0x0000000000433c12 in runshfunc (prog=0x73bc28, wrap=0x7fd2d8865d80,
    name=0x7fd2d96dd030 "_main_complete") at exec.c:4593
#276 0x0000000000433984 in doshfunc (shfunc=0x73bbf0, doshargs=0x0,
noreturnval=0) at exec.c:4502
#277 0x00007fd2d864ac4a in callcompfunc (s=0x7fd2d95736c0 "",
fn=0x740620 "_main_complete")
    at compcore.c:828
#278 0x00007fd2d864b536 in makecomplist (s=0x7fd2d95736c0 "", incmd=0,
lst=0) at compcore.c:979
#279 0x00007fd2d8649184 in do_completion (dummy=0x7fd2d8ab73c8,
dat=0x7fff23159110)
    at compcore.c:349
#280 0x00000000004627d0 in runhookdef (h=0x7fd2d8ab73c8,
d=0x7fff23159110) at module.c:996
#281 0x00007fd2d889fb52 in docompletion (s=0x6f83d0 "", lst=0,
incmd=0) at zle_tricky.c:2179
#282 0x00007fd2d889b674 in docomplete (lst=0) at zle_tricky.c:859
#283 0x00007fd2d8899d9c in expandorcomplete (args=0x7fd2d8ab7930) at
zle_tricky.c:315
#284 0x00007fd2d8899981 in completecall (args=0x7fd2d8ab7930) at
zle_tricky.c:208
#285 0x00007fd2d88882cc in execzlefunc (func=0x7fd2d8ab4358,
args=0x7fd2d8ab7930, set_bindk=0)
    at zle_main.c:1311
#286 0x00007fd2d8887783 in zlecore () at zle_main.c:1058
#287 0x00007fd2d8887e97 in zleread (lp=0x6d0a78, rp=0x0, flags=3,
context=0) at zle_main.c:1219
#288 0x00007fd2d888a7e7 in zle_main_entry (cmd=1, ap=0x7fff23159580)
at zle_main.c:1874
#289 0x000000000044a1e4 in zleentry (cmd=1) at init.c:1354
#290 0x000000000044ac49 in inputline () at input.c:281
#291 0x000000000044aac0 in ingetc () at input.c:217
#292 0x000000000043f5f4 in ihgetc () at hist.c:279
#293 0x000000000045439e in gettok () at lex.c:717
#294 0x0000000000453b2f in zshlex () at lex.c:395
#295 0x0000000000475bb4 in parse_event () at parse.c:451
#296 0x0000000000447341 in loop (toplevel=1, justonce=0) at init.c:132
#297 0x000000000044a6b3 in zsh_main (argc=2, argv=0x7fff23159968) at init.c:1508
#298 0x000000000040fee4 in main (argc=2, argv=0x7fff23159968) at ./main.c:93
(gdb)

Please let me know if any further info is needed.

Thanks,
  Vin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-28  3:13 coredump completing scp Vin Shelton
@ 2011-01-28  3:30 ` Bart Schaefer
  2011-01-28  3:46   ` Vin Shelton
  2011-01-28  9:56   ` Peter Stephenson
  0 siblings, 2 replies; 11+ messages in thread
From: Bart Schaefer @ 2011-01-28  3:30 UTC (permalink / raw)
  To: zsh-workers

On Jan 27, 10:13pm, Vin Shelton wrote:
}
} This shell was configured --with-zsh-mem and that seems to be required
} to provoke the coredump.
} 
} #11 0x00007fd2d8b57ccc in setpwent () from /lib64/libc.so.6
} #12 0x000000000043ecb4 in fillnameddirtable (ht=0x6e4b08) at hashtable.c:1382
} 
} Please let me know if any further info is needed.

Operating system and compiler?

This looks like an incompatibility of the libc free() which is
being invoked from within setpwent() and the zsh-supplied memory
routines.  There's probably not a lot to be done about it except to
avoid using --with-zsh-mem on your platform.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-28  3:30 ` Bart Schaefer
@ 2011-01-28  3:46   ` Vin Shelton
  2011-01-28  9:56   ` Peter Stephenson
  1 sibling, 0 replies; 11+ messages in thread
From: Vin Shelton @ 2011-01-28  3:46 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

On Thu, Jan 27, 2011 at 10:30 PM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Jan 27, 10:13pm, Vin Shelton wrote:
> }
> } This shell was configured --with-zsh-mem and that seems to be required
> } to provoke the coredump.
> }
> } #11 0x00007fd2d8b57ccc in setpwent () from /lib64/libc.so.6
> } #12 0x000000000043ecb4 in fillnameddirtable (ht=0x6e4b08) at hashtable.c:1382
> }
> } Please let me know if any further info is needed.
>
> Operating system and compiler?
>
> This looks like an incompatibility of the libc free() which is
> being invoked from within setpwent() and the zsh-supplied memory
> routines.  There's probably not a lot to be done about it except to
> avoid using --with-zsh-mem on your platform.
>

opensuse 11.3:

Linux legolas 2.6.34.7-0.7-desktop #1 SMP PREEMPT 2010-12-13 11:13:53
+0100 x86_64 x86_64 x86_64 GNU/Linux

gcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292]


  - Vin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-28  3:30 ` Bart Schaefer
  2011-01-28  3:46   ` Vin Shelton
@ 2011-01-28  9:56   ` Peter Stephenson
  2011-01-28 10:14     ` Peter Stephenson
  2011-01-29  1:42     ` Vin Shelton
  1 sibling, 2 replies; 11+ messages in thread
From: Peter Stephenson @ 2011-01-28  9:56 UTC (permalink / raw)
  To: zsh-workers

On Thu, 27 Jan 2011 19:30:31 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Jan 27, 10:13pm, Vin Shelton wrote:
> }
> } This shell was configured --with-zsh-mem and that seems to be
> required } to provoke the coredump.
> } 
> } #11 0x00007fd2d8b57ccc in setpwent () from /lib64/libc.so.6
> } #12 0x000000000043ecb4 in fillnameddirtable (ht=0x6e4b08) at
> hashtable.c:1382 } 
> } Please let me know if any further info is needed.

If you have valgrind, running "valgrind zsh -f" might be useful.  (I
don't think you'd need any of the options to look for leaked memory
for something like this.)

> Operating system and compiler?
> 
> This looks like an incompatibility of the libc free() which is
> being invoked from within setpwent() and the zsh-supplied memory
> routines.  There's probably not a lot to be done about it except to
> avoid using --with-zsh-mem on your platform.

It's calling free from libc, as they're paired presumably it's calling
malloc from the same place?

setpwent() is completely self-contained, though, so apart from a library
mismatch the only likely problem is trashed memory.  That setpwent()
is only used with NIS or NIS+, however valgrind still didn't
show up any errors on a RedHat x86_64 system using NIS.  Compiling
hashtable.c with -DHAVE_NIS and linking with -lnsl didn't show any
problems on my Fedora 13 Intel 32-bit system, either, but it wouldn't
find any NIS maps.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-28  9:56   ` Peter Stephenson
@ 2011-01-28 10:14     ` Peter Stephenson
  2011-01-29  1:42     ` Vin Shelton
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Stephenson @ 2011-01-28 10:14 UTC (permalink / raw)
  To: zsh-workers

On Fri, 28 Jan 2011 09:56:16 +0000
Peter Stephenson <Peter.Stephenson@csr.com> wrote:
> That setpwent() is only used with NIS or NIS+.

Sorry, counted the line numbers and *that* setpwent() is *without* NIS,
so that last bit of the previous message (which hasn't turned up here
yet and they sometimes get reordered) was nonsense.  However, same
result.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK




Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-28  9:56   ` Peter Stephenson
  2011-01-28 10:14     ` Peter Stephenson
@ 2011-01-29  1:42     ` Vin Shelton
  2011-01-29 22:16       ` Peter Stephenson
  1 sibling, 1 reply; 11+ messages in thread
From: Vin Shelton @ 2011-01-29  1:42 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

Peter -

On Fri, Jan 28, 2011 at 4:56 AM, Peter Stephenson
<Peter.Stephenson@csr.com> wrote:
> On Thu, 27 Jan 2011 19:30:31 -0800
> Bart Schaefer <schaefer@brasslantern.com> wrote:
>> On Jan 27, 10:13pm, Vin Shelton wrote:
>> }
>> } This shell was configured --with-zsh-mem and that seems to be
>> required } to provoke the coredump.
>> }
>> } #11 0x00007fd2d8b57ccc in setpwent () from /lib64/libc.so.6
>> } #12 0x000000000043ecb4 in fillnameddirtable (ht=0x6e4b08) at
>> hashtable.c:1382 }
>> } Please let me know if any further info is needed.
>
> If you have valgrind, running "valgrind zsh -f" might be useful.  (I
> don't think you'd need any of the options to look for leaked memory
> for something like this.)

Thanks for the suggestion.  Here's the report from valgrind.  The call
to setpwent is made from fillnameddirtable in hahstable.c.  I don't
really know what else to make of this, though.

legolas% scp --25509-- REDIR: 0x55636b0 (strcat) redirected to
0x4c27140 (strcat)
--25509-- Reading syms from
/home/acs/tst/lib/zsh/4.3.11-dev-1/zsh/computil.so (0x62ed000)
==25509==
==25509== HEAP SUMMARY:
==25509==     in use at exit: 0 bytes in 0 blocks
==25509==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==25509==
==25509== All heap blocks were freed -- no leaks are possible
==25509==
==25509== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
--25509--
--25509-- used_suppression:      2 dl-hack3-cond-1
==25509==
==25509== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
--25509-- Reading syms from /lib64/libnss_compat-2.11.2.so (0x6502000)
--25509-- Reading syms from /lib64/libnsl-2.11.2.so (0x670b000)
--25509-- Reading syms from /lib64/libnss_nis-2.11.2.so (0x6923000)
--25509-- Reading syms from /lib64/libnss_files-2.11.2.so (0x6b2e000)
--25509-- REDIR: 0x555ff60 (free) redirected to 0x4c25ef4 (free)
==25509== Invalid free() / delete / delete[]
==25509==    at 0x4C25F7B: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==25509==    by 0x671AD49: init (in /lib64/libnsl-2.11.2.so)
==25509==    by 0x671AE79: _nsl_default_nss (in /lib64/libnsl-2.11.2.so)
==25509==    by 0x6928300: _nss_nis_setpwent (in /lib64/libnss_nis-2.11.2.so)
==25509==    by 0x6504557: internal_setpwent (in /lib64/libnss_compat-2.11.2.so)
==25509==    by 0x6505895: _nss_compat_setpwent (in
/lib64/libnss_compat-2.11.2.so)
==25509==    by 0x55C9E1F: __nss_setent (in /lib64/libc-2.11.2.so)
==25509==    by 0x5586CCB: setpwent (in /lib64/libc-2.11.2.so)
==25509==    by 0x43ECB3: fillnameddirtable (hashtable.c:1382)
==25509==    by 0x5EE0130: scanpmuserdirs (parameter.c:1471)
==25509==    by 0x43D339: scanmatchtable (hashtable.c:381)
==25509==    by 0x43D630: scanhashtable (hashtable.c:444)
==25509==  Address 0x42d05e8 is not stack'd, malloc'd or (recently) free'd
==25509==

Regards,
  Vin


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-29  1:42     ` Vin Shelton
@ 2011-01-29 22:16       ` Peter Stephenson
  2011-01-29 23:13         ` Bart Schaefer
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Stephenson @ 2011-01-29 22:16 UTC (permalink / raw)
  To: zsh-workers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

Vin Shelton wrote:
> > If you have valgrind, running "valgrind zsh -f" might be useful.  (I
> > don't think you'd need any of the options to look for leaked memory
> > for something like this.)
> 
> Thanks for the suggestion.  Here's the report from valgrind.  The call
> to setpwent is made from fillnameddirtable in hahstable.c.  I don't
> really know what else to make of this, though.

Me neither, I'm afraid.  It certainly *looks* like an error within
setpwent itself, though that doesn't necesarily mean it is.  As valgrind
is claiming the memory wasn't malloc'd at all it doesn't give us much of
a lead.

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-29 22:16       ` Peter Stephenson
@ 2011-01-29 23:13         ` Bart Schaefer
  2011-01-29 23:33           ` Peter Stephenson
  0 siblings, 1 reply; 11+ messages in thread
From: Bart Schaefer @ 2011-01-29 23:13 UTC (permalink / raw)
  To: zsh-workers

On Jan 29, 10:16pm, Peter Stephenson wrote:
}
} Vin Shelton wrote:
} > Thanks for the suggestion.  Here's the report from valgrind.  The call
} > to setpwent is made from fillnameddirtable in hahstable.c.  I don't
} > really know what else to make of this, though.
} 
} Me neither, I'm afraid.  It certainly *looks* like an error within
} setpwent itself, though that doesn't necesarily mean it is.  As valgrind
} is claiming the memory wasn't malloc'd at all it doesn't give us much of
} a lead.

This sure seems like a bug in setpwent(), but I'll note that we're making
a call to setpwent() before ever calling getpwent() in the first place.
The doc says:

   The setpwent() function effectively rewinds the user database to allow
   repeated searches.

It may be that setpwent() assumes that getpwent() has allocated something
that it needs to free, something which never has been allocated because
getpwent() has never been called?  And that only the zsh-mem free() has
a problem with this?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-29 23:13         ` Bart Schaefer
@ 2011-01-29 23:33           ` Peter Stephenson
  2011-01-30  5:51             ` Bart Schaefer
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Stephenson @ 2011-01-29 23:33 UTC (permalink / raw)
  To: zsh-workers

On Sat, 29 Jan 2011 15:13:06 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:
> This sure seems like a bug in setpwent(), but I'll note that we're making
> a call to setpwent() before ever calling getpwent() in the first place.
> The doc says:
> 
>    The setpwent() function effectively rewinds the user database to allow
>    repeated searches.
> 
> It may be that setpwent() assumes that getpwent() has allocated something
> that it needs to free, something which never has been allocated because
> getpwent() has never been called?  And that only the zsh-mem free() has
> a problem with this?

Right, and since we always call endpwent() after all uses of getpwent(),
we're guaranteed not to need setpwent() at all, aren't we?  My reading
is certainly that after endpwent() you're guaranteed to get the whole
thing from scratch next time, which is all we need.

--- ../zsh-git/zsh/Src/hashtable.c	2010-03-25 21:01:19.000000000 +0000
+++ Src/hashtable.c	2011-01-29 23:28:25.000000000 +0000
@@ -1339,8 +1339,6 @@ fillnameddirtable(UNUSED(HashTable ht))
 #ifdef HAVE_GETPWENT
 	    struct passwd *pw;
  
-	    setpwent();
- 
 	    /* loop through the password file/database *
 	     * and add all entries returned.           */
 	    while ((pw = getpwent()) && !errflag)
@@ -1379,8 +1377,6 @@ fillnameddirtable(UNUSED(HashTable ht))
 #ifdef USE_GETPWENT
 	struct passwd *pw;
  
-	setpwent();
- 
 	/* loop through the password file/database *
 	 * and add all entries returned.           */
 	while ((pw = getpwent()) && !errflag)

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-29 23:33           ` Peter Stephenson
@ 2011-01-30  5:51             ` Bart Schaefer
  2011-02-15 19:02               ` Peter Stephenson
  0 siblings, 1 reply; 11+ messages in thread
From: Bart Schaefer @ 2011-01-30  5:51 UTC (permalink / raw)
  To: zsh-workers

On Jan 29, 11:33pm, Peter Stephenson wrote:
} Subject: Re: coredump completing scp
}
} On Sat, 29 Jan 2011 15:13:06 -0800
} Bart Schaefer <schaefer@brasslantern.com> wrote:
} > It may be that setpwent() assumes that getpwent() has allocated something
} 
} Right, and since we always call endpwent() after all uses of getpwent(),
} we're guaranteed not to need setpwent() at all, aren't we?

It's probably defensive programming against getpwent() having been used
by a module or library without being endpwent()d afterward.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: coredump completing scp
  2011-01-30  5:51             ` Bart Schaefer
@ 2011-02-15 19:02               ` Peter Stephenson
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Stephenson @ 2011-02-15 19:02 UTC (permalink / raw)
  To: zsh-workers

On Sat, 29 Jan 2011 21:51:02 -0800
Bart Schaefer <schaefer@brasslantern.com> wrote:

> On Jan 29, 11:33pm, Peter Stephenson wrote:
> } Subject: Re: coredump completing scp
> }
> } On Sat, 29 Jan 2011 15:13:06 -0800
> } Bart Schaefer <schaefer@brasslantern.com> wrote:
> } > It may be that setpwent() assumes that getpwent() has allocated something
> } 
> } Right, and since we always call endpwent() after all uses of getpwent(),
> } we're guaranteed not to need setpwent() at all, aren't we?
> 
> It's probably defensive programming against getpwent() having been used
> by a module or library without being endpwent()d afterward.

While that doesn't seem all that useful at the moment, we could cover
all the bases by attempt to read from the database before we rewind it.

Index: Src/hashtable.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/hashtable.c,v
retrieving revision 1.32
diff -p -u -r1.32 hashtable.c
--- Src/hashtable.c	21 Sep 2009 09:22:23 -0000	1.32
+++ Src/hashtable.c	15 Feb 2011 19:00:21 -0000
@@ -1339,6 +1339,12 @@ fillnameddirtable(UNUSED(HashTable ht))
 #ifdef HAVE_GETPWENT
 	    struct passwd *pw;
  
+	    /*
+	     * setpwent() rewinds the database.  Apparently some
+	     * implementations have problems if the database wasn't
+	     * read, so perform a dummy read first.
+	     */
+	    (void)getpwent();
 	    setpwent();
  
 	    /* loop through the password file/database *
@@ -1379,6 +1385,12 @@ fillnameddirtable(UNUSED(HashTable ht))
 #ifdef USE_GETPWENT
 	struct passwd *pw;
  
+	/*
+	 * setpwent() rewinds the database.  Apparently some
+	 * implementations have problems if the database wasn't
+	 * read, so perform a dummy read first.
+	 */
+	(void)getpwent();
 	setpwent();
  
 	/* loop through the password file/database *

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-02-15 19:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-28  3:13 coredump completing scp Vin Shelton
2011-01-28  3:30 ` Bart Schaefer
2011-01-28  3:46   ` Vin Shelton
2011-01-28  9:56   ` Peter Stephenson
2011-01-28 10:14     ` Peter Stephenson
2011-01-29  1:42     ` Vin Shelton
2011-01-29 22:16       ` Peter Stephenson
2011-01-29 23:13         ` Bart Schaefer
2011-01-29 23:33           ` Peter Stephenson
2011-01-30  5:51             ` Bart Schaefer
2011-02-15 19:02               ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).