zsh-workers
 help / color / mirror / code / Atom feed
* NSS LDAP/TLS crashing
@ 2003-10-28 13:02 Clint Adams
  2003-10-28 14:09 ` Peter Stephenson
  0 siblings, 1 reply; 10+ messages in thread
From: Clint Adams @ 2003-10-28 13:02 UTC (permalink / raw)
  To: zsh-workers; +Cc: 217915-forwarded, Frédéric Gobry

Is there something that zsh is doing that would make zlib or GNUTLS
unhappy somehow?

(4.0.7-5) was nearly identical to 4.0 branch on July 13.

----- Forwarded message from Frédéric Gobry <frederic.gobry@smartdata.ch> -----

Date: Tue, 28 Oct 2003 09:41:37 +0100
From: Frédéric Gobry <frederic.gobry@smartdata.ch>
Subject: Bug#217915: zsh: crash when accessing homedirs provided by LDAP with TLS

Package: zsh
Version: 4.0.7-5
Severity: normal

First of all, I don't know for sure if this problem is in zsh proper,
but it is the only place where it occurs.

I have an LDAP server which contains unix account information. When I
type:

 cd ~user

where user is resolved via LDAP, zsh crashes. This is the stack dump:

#0  0x410893c9 in mallopt () from /lib/libc.so.6
#1  0x410885d3 in malloc () from /lib/libc.so.6
#2  0x0807b2ef in zcalloc ()
#3  0x404f3933 in deflateInit2_ () from /usr/lib/libz.so.1
#4  0x4048731a in _gnutls_comp_init () from /usr/lib/libgnutls.so.7
#5  0x4048d3bf in _gnutls_write_connection_state_init () from /usr/lib/libgnutls.so.7
#6  0x4048429e in _gnutls_get_adv_version () from /usr/lib/libgnutls.so.7
#7  0x40483571 in _gnutls_handshake_common () from /usr/lib/libgnutls.so.7
#8  0x40482f78 in gnutls_handshake () from /usr/lib/libgnutls.so.7
#9  0x4035b8ba in gnutls_SSL_free () from /usr/lib/libldap.so.2
#10 0x4035b9eb in gnutls_SSL_connect () from /usr/lib/libldap.so.2
#11 0x40359a8d in ldap_pvt_tls_init_def_ctx () from /usr/lib/libldap.so.2
#12 0x4035ab13 in ldap_int_tls_start () from /usr/lib/libldap.so.2
#13 0x4035af20 in ldap_start_tls_s () from /usr/lib/libldap.so.2
#14 0x40318e5a in _fini () from /lib/libnss_ldap.so.2
#15 0x40319fca in _fini () from /lib/libnss_ldap.so.2
#16 0x4031a525 in _fini () from /lib/libnss_ldap.so.2
#17 0x4031b649 in _nss_ldap_getpwnam_r () from /lib/libnss_ldap.so.2
#18 0x410be755 in getpwnam_r () from /lib/libc.so.6
#19 0x410be22f in getpwnam () from /lib/libc.so.6
#20 0x080980f5 in getnameddir ()
#21 0x08091ab5 in filesubstr ()
#22 0x08091763 in filesub ()
#23 0x08090f01 in prefork ()
#24 0x08060e9b in execsubst ()
#25 0x0805e809 in execlist ()
#26 0x0805dfc7 in execlist ()
#27 0x0805dd60 in execlist ()
#28 0x0805d8d7 in execode ()
#29 0x0806dd0a in loop ()
#30 0x080701c3 in zsh_main ()
#31 0x08051477 in main ()
#32 0x4102ce3e in __libc_start_main () from /lib/libc.so.6

It seems to occur in the TLS layer, which is part of GNU TLS I
guess. When configuring LDAP not to use TLS, zsh does not crash.
What makes me think that it might be zsh related is that everything
works with bash, and a simple test program that invokes getpwnam works
also. I've run zsh under valgrind, and it detected some access
violations that could lead to unexpected issues like this one.

The (long) valgrind log is appended below. I hope this might be
useful. I can easily perform additional tests if required.




==20890== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==20890== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==20890== Using valgrind-20030725, a program supervision framework for x86-linux.
==20890== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==20890== Estimated CPU clock rate is 598 MHz
==20890== For more details, rerun with: -v
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x41008ABA: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==20890==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x41008B05: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==20890==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==20891== 
==20891== Invalid write of size 4
==20891==    at 0x805CC10: (within /bin/zsh4)
==20891==    by 0x805D0B2: execute (in /bin/zsh4)
==20891==    by 0x8060013: (within /bin/zsh4)
==20891==    by 0x805E808: (within /bin/zsh4)
==20891==    Address 0x40CAC124 is 0 bytes after a block of size 176 alloc'd
==20891==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==20891==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==20891==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==20891==    by 0x8084608: addenv (in /bin/zsh4)
==20892== 
==20892== Invalid write of size 4
==20892==    at 0x805CC10: (within /bin/zsh4)
==20892==    by 0x805D0B2: execute (in /bin/zsh4)
==20892==    by 0x8060013: (within /bin/zsh4)
==20892==    by 0x805E808: (within /bin/zsh4)
==20892==    Address 0x40CAC124 is 0 bytes after a block of size 176 alloc'd
==20892==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==20892==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==20892==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==20892==    by 0x8084608: addenv (in /bin/zsh4)
==20894== 
==20894== Invalid write of size 4
==20894==    at 0x805CC10: (within /bin/zsh4)
==20894==    by 0x805D0B2: execute (in /bin/zsh4)
==20894==    by 0x8060013: (within /bin/zsh4)
==20894==    by 0x805E808: (within /bin/zsh4)
==20894==    Address 0x40CAC124 is 0 bytes after a block of size 176 alloc'd
==20894==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==20894==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==20894==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==20894==    by 0x8084608: addenv (in /bin/zsh4)
==20896== discard syms in /lib/libnss_compat-2.3.2.so due to munmap()
==20896== discard syms in /lib/libnss_nis-2.3.2.so due to munmap()
==20896== discard syms in /lib/libnss_files-2.3.2.so due to munmap()
==20896== 
==20896== ERROR SUMMARY: 14 errors from 2 contexts (suppressed: 0 from 0)
==20896== malloc/free: in use at exit: 241480 bytes in 10216 blocks.
==20896== malloc/free: 15821 allocs, 5605 frees, 1865477 bytes allocated.
==20896== For a detailed leak analysis,  rerun with: --leak-check=yes
==20896== For counts of detected errors, rerun with: -v
==20897== 
==20897== Invalid write of size 4
==20897==    at 0x805CC10: (within /bin/zsh4)
==20897==    by 0x805D0B2: execute (in /bin/zsh4)
==20897==    by 0x8060013: (within /bin/zsh4)
==20897==    by 0x805E808: (within /bin/zsh4)
==20897==    Address 0x40CAC124 is 0 bytes after a block of size 176 alloc'd
==20897==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==20897==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==20897==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==20897==    by 0x8084608: addenv (in /bin/zsh4)
==20898== 
==20898== Invalid write of size 4
==20898==    at 0x805CC10: (within /bin/zsh4)
==20898==    by 0x805D0B2: execute (in /bin/zsh4)
==20898==    by 0x8060013: (within /bin/zsh4)
==20898==    by 0x805E808: (within /bin/zsh4)
==20898==    Address 0x40CAC124 is 0 bytes after a block of size 176 alloc'd
==20898==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==20898==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==20898==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==20898==    by 0x8084608: addenv (in /bin/zsh4)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x4211F154: __memp_fopen_int_4001 (in /usr/lib/libdb-4.1.so)
==20890==    by 0x4211EB93: (within /usr/lib/libdb-4.1.so)
==20890==    by 0x420D83D3: __db_dbenv_setup_4001 (in /usr/lib/libdb-4.1.so)
==20890==    by 0x420E7E8F: __db_dbopen_4001 (in /usr/lib/libdb-4.1.so)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x4100896A: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==20890==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x41008976: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==20890==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==20890==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==20890== 
==20890== Syscall param open(pathname) contains uninitialised or unaddressable byte(s)
==20890==    at 0x410E1778: __libc_open (in /lib/libc-2.3.2.so)
==20890==    by 0x41081207: _IO_file_fopen (in /lib/libc-2.3.2.so)
==20890==    by 0x4107745C: (within /lib/libc-2.3.2.so)
==20890==    by 0x410774BD: _IO_fopen (in /lib/libc-2.3.2.so)
==20890==    Address 0x0 is not stack'd, malloc'd or free'd
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x423CF008: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423A7982: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423A7D7E: gcry_sexp_build (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231FA14: (within /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x423CF008: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423A7982: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423A7D7E: gcry_sexp_build (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231FA34: (within /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x423CF008: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423A7982: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423A7D7E: gcry_sexp_build (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423AE3C2: gcry_pk_encrypt (in /usr/lib/libgcrypt.so.1.5.1)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x423CEF6C: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231F29C: _gnutls_mpi_print (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4232EF1B: _gnutls_gen_dh_common_client_kx (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231AF2B: _gnutls_send_client_kx_message (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8D3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01478 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8D9: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01460 is 0 bytes inside a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A8B3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8DB: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01488 is 16 bytes before a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8E5: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01484 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8EC: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C0148C is 12 bytes before a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8F7: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014A8 is 10 bytes after a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A8FE: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014A4 is 6 bytes after a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A907: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014AC is 14 bytes after a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A917: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014B0 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242A923: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01484 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A93B: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01490 is 8 bytes before a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242A942: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01484 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242A961: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014A4 is 6 bytes after a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A977: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C0149C is 4 bytes inside a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A984: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02AF4 is 168 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242A993: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02AF4 is 168 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242A9AB: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02AF4 is 168 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A9B1: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01468 is 7 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A8B3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A9BA: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C0146C is 11 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A8B3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242A9BD: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01490 is 8 bytes before a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Conditional jump or move depends on uninitialised value(s)
==20890==    at 0x4242A9D0: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A9E2: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02AFC is 176 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A9F4: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014DC is 11 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242A9FA: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02AF0 is 164 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 1
==20890==    at 0x4242AA00: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C0147D is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242AA04: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231929D: (within /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014E0 is 15 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242ABF7: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01468 is 7 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A8B3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242ABFA: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01478 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242AC14: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01474 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242AC1B: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01470 is 15 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A8B3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242AC2C: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01480 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242AC3D: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423223BE: _gnutls_write_connection_state_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01464 is 3 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A8B3: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C707: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01F70 is 4 bytes before a block of size 128 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B057C: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C713: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01F78 is 4 bytes inside a block of size 128 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B057C: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C71F: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01F7C is 8 bytes inside a block of size 128 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B057C: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C72B: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01F84 is 16 bytes inside a block of size 128 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B057C: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C737: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01F88 is 20 bytes inside a block of size 128 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B057C: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C745: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01F90 is 28 bytes inside a block of size 128 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B057C: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 2
==20890==    at 0x4242C74D: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02B10 is 196 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C759: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02B14 is 200 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== More than 50 errors detected.  Subsequent errors
==20890== will still be recorded, but in less detail than before.
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C75F: _tr_init (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02B0C is 192 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 2
==20890==    at 0x4242C782: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014EC is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 2
==20890==    at 0x4242C7A2: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01DE0 is 708 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0A07: gcry_md_ctl (in /usr/lib/libgcrypt.so.1.5.1)
==20890== 
==20890== Invalid write of size 2
==20890==    at 0x4242C7B4: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01ED4 is 952 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0A07: gcry_md_ctl (in /usr/lib/libgcrypt.so.1.5.1)
==20890== 
==20890== Invalid write of size 2
==20890==    at 0x4242C7C9: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C018EC is 552 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C7D2: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02B04 is 184 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C7DA: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02B00 is 180 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C7E2: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02B08 is 188 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242C7E8: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC47: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C02AF8 is 172 bytes inside a block of size 1064 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x423A6019: gcry_free (in /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x423B0584: (within /usr/lib/libgcrypt.so.1.5.1)
==20890==    by 0x4231BB93: _gnutls_hmac_deinit (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242B586: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01484 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242B589: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014A4 is 6 bytes after a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B58E: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C01494 is 4 bytes before a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Use of uninitialised value of size 4
==20890==    at 0x4242B598: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 2
==20890==    at 0x4242B598: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C1C1BE is 2458 bytes inside a block of size 4096 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x8065790: zglob (in /bin/zsh4)
==20890==    by 0x809154E: globlist (in /bin/zsh4)
==20890==    by 0x805F0C5: (within /bin/zsh4)
==20890== 
==20890== Use of uninitialised value of size 4
==20890==    at 0x4108EAEB: memset (in /lib/libc-2.3.2.so)
==20890==    by 0x4242B5B0: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4108EAEB: memset (in /lib/libc-2.3.2.so)
==20890==    by 0x4242B5B0: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    Address 0x41C0C1C0 is 0 bytes inside a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A970: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 1
==20890==    at 0x4108EAF2: memset (in /lib/libc-2.3.2.so)
==20890==    by 0x4242B5B0: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    Address 0x41C1C1BC is 2456 bytes inside a block of size 4096 free'd
==20890==    at 0x400159D1: free (vg_replace_malloc.c:220)
==20890==    by 0x8065790: zglob (in /bin/zsh4)
==20890==    by 0x809154E: globlist (in /bin/zsh4)
==20890==    by 0x805F0C5: (within /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5B1: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014C4 is 12 bytes before a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid read of size 4
==20890==    at 0x4242B5B8: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014DC is 11 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5C1: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014B4 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5C8: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014CC is 4 bytes before a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5DA: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014D0 is 0 bytes inside a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5E1: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014B8 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5E8: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014C0 is 16 bytes before a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5EF: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014D8 is 7 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5F6: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014A0 is 2 bytes after a block of size 6 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B1CE: zalloc (in /bin/zsh4)
==20890==    by 0x809097E: ztrdup (in /bin/zsh4)
==20890==    by 0x807FF27: copyparam (in /bin/zsh4)
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B5FD: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014E4 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B608: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014E8 is not stack'd, malloc'd or free'd
==20890== 
==20890== Invalid write of size 4
==20890==    at 0x4242B613: (within /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AC4F: deflateReset (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4242AA11: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)
==20890==    Address 0x41C014D4 is 3 bytes after a block of size 1 alloc'd
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x807B2EE: zcalloc (in /bin/zsh4)
==20890==    by 0x4242A932: deflateInit2_ (in /usr/lib/libz.so.1.1.4)
==20890==    by 0x4231C319: _gnutls_comp_init (in /usr/lib/libgnutls.so.7.0.9)

valgrind: vg_malloc2.c:312 (mk_plain_bszW): Assertion `bszW != 0' failed.

sched status:

Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
==20890==    at 0x400156F1: malloc (vg_replace_malloc.c:153)
==20890==    by 0x4231B92D: _gnutls_hash_copy (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x4231719E: _gnutls_finished (in /usr/lib/libgnutls.so.7.0.9)
==20890==    by 0x423175C8: _gnutls_send_finished (in /usr/lib/libgnutls.so.7.0.9)


Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.

If that doesn't help, please report this bug to: jseward@acm.org

In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using.  Thanks.





-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux rhin 2.4.22 #1 Wed Aug 27 11:35:06 CEST 2003 i686
Locale: LANG=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1

Versions of packages zsh depends on:
ii  debconf                   1.3.15         Debian configuration management sy
ii  libc6                     2.3.2-7        GNU C Library: Shared libraries an
ii  libcap1                   1:1.10-12      support for getting/setting POSIX.
ii  libncurses5               5.3.20030719-1 Shared libraries for terminal hand

-- debconf information:
* zsh/rcmove: 


----- End forwarded message -----


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

* Re: NSS LDAP/TLS crashing
  2003-10-28 13:02 NSS LDAP/TLS crashing Clint Adams
@ 2003-10-28 14:09 ` Peter Stephenson
  2003-10-28 14:25   ` Frederic Gobry
  2003-10-28 14:30   ` Clint Adams
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Stephenson @ 2003-10-28 14:09 UTC (permalink / raw)
  To: zsh-workers, 217915-forwarded, Frédéric Gobry

Clint Adams wrote:
> Is there something that zsh is doing that would make zlib or GNUTLS
> unhappy somehow?

Looks like there's some interaction between zsh's memory handling and
the library functions.  I'm surprised to see zcalloc (which is a zsh
function) so near the top of the call stack.  Does zcalloc appear as a
symbol in the C library in question?  In that case we probably need to
rename it.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: NSS LDAP/TLS crashing
  2003-10-28 14:09 ` Peter Stephenson
@ 2003-10-28 14:25   ` Frederic Gobry
  2003-10-28 14:30   ` Clint Adams
  1 sibling, 0 replies; 10+ messages in thread
From: Frederic Gobry @ 2003-10-28 14:25 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, 217915-forwarded

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

> Looks like there's some interaction between zsh's memory handling and
> the library functions.  I'm surprised to see zcalloc (which is a zsh
> function) so near the top of the call stack.  Does zcalloc appear as a
> symbol in the C library in question?  In that case we probably need to
> rename it.

Given the stack address (0x080...), it looks as if the actual function
from zsh is called. There probably was a corruption somewhere before
that... I hope the valgrind trace will be of some use. The first
invalid writes are a bit worrying, aren't they ?

Frédéric

-- 
 Frédéric Gobry       SMARTDATA    	  
                      http://www.smartdata.ch/
 PGP: 5B44F4A5        Lausanne - Switzerland
                      +41 21 693 84 98

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: NSS LDAP/TLS crashing
  2003-10-28 14:09 ` Peter Stephenson
  2003-10-28 14:25   ` Frederic Gobry
@ 2003-10-28 14:30   ` Clint Adams
  2003-10-28 15:28     ` Peter Stephenson
  1 sibling, 1 reply; 10+ messages in thread
From: Clint Adams @ 2003-10-28 14:30 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, 217915, Frédéric Gobry

> Looks like there's some interaction between zsh's memory handling and
> the library functions.  I'm surprised to see zcalloc (which is a zsh
> function) so near the top of the call stack.  Does zcalloc appear as a
> symbol in the C library in question?  In that case we probably need to
> rename it.

That's it.

% objdump -T /usr/lib/libz.so.1 | grep zcal
00008110 g    DF .text	00000018  Base        zcalloc


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

* Re: NSS LDAP/TLS crashing
  2003-10-28 14:30   ` Clint Adams
@ 2003-10-28 15:28     ` Peter Stephenson
  2003-10-28 15:46       ` Frederic Gobry
                         ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Peter Stephenson @ 2003-10-28 15:28 UTC (permalink / raw)
  To: zsh-workers, 217915, Frédéric Gobry

Clint Adams wrote:
> > Looks like there's some interaction between zsh's memory handling and
> > the library functions.  I'm surprised to see zcalloc (which is a zsh
> > function) so near the top of the call stack.  Does zcalloc appear as a
> > symbol in the C library in question?  In that case we probably need to
> > rename it.
> 
> That's it.
> 
> % objdump -T /usr/lib/libz.so.1 | grep zcal
> 00008110 g    DF .text	00000018  Base        zcalloc

So it looks like we now need to second-guess the zlib interface.  Here's
a patch for 4.0; I will commit the 4.1 version directly.

I'd be interested to see what difference, if any, this makes to the
valgrind output.

Index: Src/builtin.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v
retrieving revision 1.46.4.15
diff -u -r1.46.4.15 builtin.c
--- Src/builtin.c	28 Mar 2003 20:32:47 -0000	1.46.4.15
+++ Src/builtin.c	28 Oct 2003 15:22:03 -0000
@@ -2207,7 +2207,7 @@
 		DPUTS(!shf->funcdef,
 		      "BUG: Calling autoload from empty function");
 	    } else {
-		shf = (Shfunc) zcalloc(sizeof *shf);
+		shf = (Shfunc) zshcalloc(sizeof *shf);
 		shfunctab->addnode(shfunctab, ztrdup(scriptname), shf);
 	    }
 	    shf->flags = on;
@@ -2278,7 +2278,7 @@
 	} else if (on & PM_UNDEFINED) {
 	    /* Add a new undefined (autoloaded) function to the *
 	     * hash table with the corresponding flags set.     */
-	    shf = (Shfunc) zcalloc(sizeof *shf);
+	    shf = (Shfunc) zshcalloc(sizeof *shf);
 	    shf->flags = on;
 	    shf->funcdef = mkautofn(shf);
 	    shfunctab->addnode(shfunctab, ztrdup(*argv), shf);
@@ -2665,11 +2665,11 @@
 		/* The argument is of the form foo=bar, *
 		 * so define an entry for the table.    */
 		if(ops['d']) {
-		    Nameddir nd = hn = zcalloc(sizeof *nd);
+		    Nameddir nd = hn = zshcalloc(sizeof *nd);
 		    nd->flags = 0;
 		    nd->dir = ztrdup(asg->value);
 		} else {
-		    Cmdnam cn = hn = zcalloc(sizeof *cn);
+		    Cmdnam cn = hn = zshcalloc(sizeof *cn);
 		    cn->flags = HASHED;
 		    cn->u.cmd = ztrdup(asg->value);
 		}
Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.28.4.8
diff -u -r1.28.4.8 exec.c
--- Src/exec.c	18 Dec 2002 16:56:27 -0000	1.28.4.8
+++ Src/exec.c	28 Oct 2003 15:22:03 -0000
@@ -688,7 +688,7 @@
     if (!*pp)
 	return NULL;
 
-    cn = (Cmdnam) zcalloc(sizeof *cn);
+    cn = (Cmdnam) zshcalloc(sizeof *cn);
     cn->flags = 0;
     cn->u.name = pp;
     cmdnamtab->addnode(cmdnamtab, ztrdup(arg0), cn);
@@ -3358,7 +3358,7 @@
 	LinkNode node;
 
 	node = doshargs->first;
-	pparams = x = (char **) zcalloc(((sizeof *x) *
+	pparams = x = (char **) zshcalloc(((sizeof *x) *
 					 (1 + countlinknodes(doshargs))));
 	if (isset(FUNCTIONARGZERO)) {
 	    oargv0 = argzero;
@@ -3368,7 +3368,7 @@
 	for (; node; node = node->next, x++)
 	    *x = ztrdup((char *) node->dat);
     } else {
-	pparams = (char **) zcalloc(sizeof *pparams);
+	pparams = (char **) zshcalloc(sizeof *pparams);
 	if (isset(FUNCTIONARGZERO)) {
 	    oargv0 = argzero;
 	    argzero = ztrdup(argzero);
Index: Src/hashtable.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/hashtable.c,v
retrieving revision 1.10.4.1
diff -u -r1.10.4.1 hashtable.c
--- Src/hashtable.c	5 Jul 2001 11:47:04 -0000	1.10.4.1
+++ Src/hashtable.c	28 Oct 2003 15:22:03 -0000
@@ -96,7 +96,7 @@
 {
     HashTable ht;
 
-    ht = (HashTable) zcalloc(sizeof *ht);
+    ht = (HashTable) zshcalloc(sizeof *ht);
 #ifdef ZSH_HASH_DEBUG
     ht->next = NULL;
     if(!firstht)
@@ -108,7 +108,7 @@
     ht->printinfo = printinfo ? printinfo : printhashtabinfo;
     ht->tablename = ztrdup(name);
 #endif /* ZSH_HASH_DEBUG */
-    ht->nodes = (HashNode *) zcalloc(size * sizeof(HashNode));
+    ht->nodes = (HashNode *) zshcalloc(size * sizeof(HashNode));
     ht->hsize = size;
     ht->ct = 0;
     ht->scan = NULL;
@@ -458,7 +458,7 @@
     onodes = ht->nodes;
 
     ht->hsize = osize * 4;
-    ht->nodes = (HashNode *) zcalloc(ht->hsize * sizeof(HashNode));
+    ht->nodes = (HashNode *) zshcalloc(ht->hsize * sizeof(HashNode));
     ht->ct = 0;
 
     /* scan through the old list of nodes, and *
@@ -496,7 +496,7 @@
      * we free it and allocate a new nodes array.          */
     if (ht->hsize != newsize) {
 	zfree(ht->nodes, ht->hsize * sizeof(HashNode));
-	ht->nodes = (HashNode *) zcalloc(newsize * sizeof(HashNode));
+	ht->nodes = (HashNode *) zshcalloc(newsize * sizeof(HashNode));
 	ht->hsize = newsize;
     } else {
 	/* else we just re-zero the current nodes array */
@@ -639,7 +639,7 @@
 
     while ((fn = zreaddir(dir, 1))) {
 	if (!cmdnamtab->getnode(cmdnamtab, fn)) {
-	    cn = (Cmdnam) zcalloc(sizeof *cn);
+	    cn = (Cmdnam) zshcalloc(sizeof *cn);
 	    cn->flags = 0;
 	    cn->u.name = dirp;
 	    cmdnamtab->addnode(cmdnamtab, ztrdup(fn), cn);
@@ -654,7 +654,7 @@
 	    (exe[3] == 'E' || exe[3] == 'e') && exe[4] == 0) {
 	    *exe = 0;
 	    if (!cmdnamtab->getnode(cmdnamtab, fn)) {
-		cn = (Cmdnam) zcalloc(sizeof *cn);
+		cn = (Cmdnam) zshcalloc(sizeof *cn);
 		cn->flags = 0;
 		cn->u.name = dirp;
 		cmdnamtab->addnode(cmdnamtab, ztrdup(fn), cn);
@@ -1048,7 +1048,7 @@
 {
     Alias al;
 
-    al = (Alias) zcalloc(sizeof *al);
+    al = (Alias) zshcalloc(sizeof *al);
     al->flags = flags;
     al->text = txt;
     al->inuse = 0;
Index: Src/hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/hist.c,v
retrieving revision 1.28.4.10
diff -u -r1.28.4.10 hist.c
--- Src/hist.c	14 Jun 2002 17:53:24 -0000	1.28.4.10
+++ Src/hist.c	28 Oct 2003 15:22:04 -0000
@@ -771,7 +771,7 @@
 	hwend = nohwe;
 	addtoline = nohw;
     } else {
-	chline = hptr = zcalloc(hlinesz = 64);
+	chline = hptr = zshcalloc(hlinesz = 64);
 	chwords = zalloc((chwordlen = 64) * sizeof(short));
 	hgetc = ihgetc;
 	hungetc = ihungetc;
@@ -933,7 +933,7 @@
     }
 
     if (histlinect < histsiz) {
-	he = (Histent)zcalloc(sizeof *he);
+	he = (Histent)zshcalloc(sizeof *he);
 	if (!hist_ring)
 	    hist_ring = he->up = he->down = he;
 	else {
Index: Src/init.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/init.c,v
retrieving revision 1.18.4.6
diff -u -r1.18.4.6 init.c
--- Src/init.c	23 Apr 2003 18:13:00 -0000	1.18.4.6
+++ Src/init.c	28 Oct 2003 15:22:04 -0000
@@ -325,7 +325,7 @@
     if(isset(SINGLECOMMAND))
 	opts[INTERACTIVE] &= 1;
     opts[INTERACTIVE] = !!opts[INTERACTIVE];
-    pparams = x = (char **) zcalloc((countlinknodes(paramlist) + 1) * sizeof(char *));
+    pparams = x = (char **) zshcalloc((countlinknodes(paramlist) + 1) * sizeof(char *));
 
     while ((*x++ = (char *)getlinknode(paramlist)));
     free(paramlist);
@@ -1191,9 +1191,9 @@
 	  break;
     } while (zsh_name);
 
-    /* Not zopenmax() here: it may return a number too big for zcalloc(). */
+    /* Not zopenmax() here: it may return a number too big for zshcalloc(). */
     fdtable_size = 256; /* This grows as necessary, see utils.c:movefd(). */
-    fdtable = zcalloc(fdtable_size);
+    fdtable = zshcalloc(fdtable_size);
 
     createoptiontable();
     emulate(zsh_name, 1);   /* initialises most options */
Index: Src/input.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/input.c,v
retrieving revision 1.4
diff -u -r1.4 input.c
--- Src/input.c	16 Jan 2001 13:44:20 -0000	1.4
+++ Src/input.c	28 Oct 2003 15:22:04 -0000
@@ -371,7 +371,7 @@
 	     * can't back up where we want to.  Instead, we just push it
 	     * onto the input stack as an extra character.
 	     */
-	    char *cback = (char *)zcalloc(2);
+	    char *cback = (char *)zshcalloc(2);
 	    cback[0] = (char) c;
 	    inpush(cback, INP_FREE|INP_CONT, NULL);
 	}
Index: Src/jobs.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/jobs.c,v
retrieving revision 1.11.4.1
diff -u -r1.11.4.1 jobs.c
--- Src/jobs.c	8 Aug 2002 10:48:51 -0000	1.11.4.1
+++ Src/jobs.c	28 Oct 2003 15:22:04 -0000
@@ -815,7 +815,7 @@
     Process pn;
     struct timezone dummy_tz;
 
-    pn = (Process) zcalloc(sizeof *pn);
+    pn = (Process) zshcalloc(sizeof *pn);
     pn->pid = pid;
     if (text)
 	strcpy(pn->text, text);
Index: Src/mem.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/mem.c,v
retrieving revision 1.5
diff -u -r1.5 mem.c
--- Src/mem.c	7 Mar 2001 12:58:41 -0000	1.5
+++ Src/mem.c	28 Oct 2003 15:22:04 -0000
@@ -32,7 +32,7 @@
 
 /*
 	There are two ways to allocate memory in zsh.  The first way is
-	to call zalloc/zcalloc, which call malloc/calloc directly.  It
+	to call zalloc/zshcalloc, which call malloc/calloc directly.  It
 	is legal to call realloc() or free() on memory allocated this way.
 	The second way is to call zhalloc/hcalloc, which allocates memory
 	from one of the memory pools on the heap stack.  Such memory pools 
@@ -498,7 +498,7 @@
 
 /**/
 mod_export void *
-zcalloc(size_t size)
+zshcalloc(size_t size)
 {
     void *ptr;
 
Index: Src/module.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/module.c,v
retrieving revision 1.9
diff -u -r1.9 module.c
--- Src/module.c	18 May 2001 15:23:09 -0000	1.9
+++ Src/module.c	28 Oct 2003 15:22:04 -0000
@@ -226,7 +226,7 @@
 int
 add_autobin(char *nam, char *module)
 {
-    Builtin bn = zcalloc(sizeof(*bn));
+    Builtin bn = zshcalloc(sizeof(*bn));
     bn->nam = ztrdup(nam);
     bn->optstr = ztrdup(module);
     return addbuiltin(bn);
@@ -770,7 +770,7 @@
 	    unqueue_signals();
 	    return 0;
 	}
-	m = zcalloc(sizeof(*m));
+	m = zshcalloc(sizeof(*m));
 	m->nam = ztrdup(name);
 	if (handle) {
 	    m->u.handle = handle;
@@ -912,7 +912,7 @@
      * *points* to a module with dependencies, of course.)
      */
     if (!(node = find_module(name, 1, &name))) {
-	m = zcalloc(sizeof(*m));
+	m = zshcalloc(sizeof(*m));
 	m->nam = ztrdup(name);
 	zaddlinknode(modules, m);
     } else
@@ -1094,7 +1094,7 @@
 		    }
 		    zsfree(m->u.alias);
 		} else {
-		    m = (Module) zcalloc(sizeof(*m));
+		    m = (Module) zshcalloc(sizeof(*m));
 		    m->nam = ztrdup(*args);
 		    m->flags = MOD_ALIAS;
 		    zaddlinknode(modules, m);
Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.48.4.9
diff -u -r1.48.4.9 params.c
--- Src/params.c	12 May 2003 14:03:37 -0000	1.48.4.9
+++ Src/params.c	28 Oct 2003 15:22:04 -0000
@@ -318,7 +318,7 @@
 {
     /* Going into a real parameter, so always use permanent storage */
     Param pm = (Param)hn;
-    Param tpm = (Param) zcalloc(sizeof *tpm);
+    Param tpm = (Param) zshcalloc(sizeof *tpm);
     tpm->nam = ztrdup(pm->nam);
     copyparam(tpm, pm, 0);
     addhashnode(outtable, tpm->nam, tpm);
@@ -687,7 +687,7 @@
 	    pm->ct = 0;
 	    oldpm = pm->old;
 	} else {
-	    pm = (Param) zcalloc(sizeof *pm);
+	    pm = (Param) zshcalloc(sizeof *pm);
 	    if ((pm->old = oldpm)) {
 		/*
 		 * needed to avoid freeing oldpm, but we do take it
@@ -1753,7 +1753,7 @@
 	if (v->end <= n)
 	    ll += n - v->end + 1;
 
-	p = new = (char **) zcalloc(sizeof(char *) * (ll + 1));
+	p = new = (char **) zshcalloc(sizeof(char *) * (ll + 1));
 
 	for (i = 0; i < v->start; i++)
 	    *p++ = i < n ? ztrdup(*q++) : ztrdup("");
Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.20.4.6
diff -u -r1.20.4.6 parse.c
--- Src/parse.c	6 Oct 2002 18:37:45 -0000	1.20.4.6
+++ Src/parse.c	28 Oct 2003 15:22:04 -0000
@@ -2064,7 +2064,7 @@
     r->len = p->len;
     r->npats = p->npats;
     pp = r->pats = (heap ? (Patprog *) hcalloc(r->len) :
-		    (Patprog *) zcalloc(r->len));
+		    (Patprog *) zshcalloc(r->len));
     r->prog = (Wordcode) (r->pats + r->npats);
     r->strs = ((char *) r->prog) + (p->strs - ((char *) p->prog));
     memcpy(r->prog, p->prog, r->len - (p->npats * sizeof(Patprog)));
@@ -3161,7 +3161,7 @@
 
     for (n = firstfdhead(h), e = (FDHead) (h + fdheaderlen(h)); n < e;
 	 n = nextfdhead(n)) {
-	shf = (Shfunc) zcalloc(sizeof *shf);
+	shf = (Shfunc) zshcalloc(sizeof *shf);
 	shf->flags = on;
 	shf->funcdef = mkautofn(shf);
 	shfunctab->addnode(shfunctab, ztrdup(fdname(n) + fdhtail(n)), shf);
Index: Src/pattern.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/pattern.c,v
retrieving revision 1.9.4.1
diff -u -r1.9.4.1 pattern.c
--- Src/pattern.c	3 Jun 2003 18:03:38 -0000	1.9.4.1
+++ Src/pattern.c	28 Oct 2003 15:22:04 -0000
@@ -1430,9 +1430,9 @@
 		char **matcharr, **mbeginarr, **mendarr;
 		char numbuf[DIGBUFSIZE];
 
-		matcharr = zcalloc(palen*sizeof(char *));
-		mbeginarr = zcalloc(palen*sizeof(char *));
-		mendarr = zcalloc(palen*sizeof(char *));
+		matcharr = zshcalloc(palen*sizeof(char *));
+		mbeginarr = zshcalloc(palen*sizeof(char *));
+		mendarr = zshcalloc(palen*sizeof(char *));
 
 		sp = patbeginp;
 		ep = patendp;
@@ -1786,7 +1786,7 @@
 			oldsyncstr = syncstrp->p;
 			if (!patinlen)
 			    patinlen = strlen(patinstart)+1;
-			syncstrp->p = (unsigned char *)zcalloc(patinlen);
+			syncstrp->p = (unsigned char *)zshcalloc(patinlen);
 			while ((ret = patmatch(P_OPERAND(scan)))) {
 			    unsigned char *syncpt;
 			    char savchar, *testptr;
@@ -1909,7 +1909,7 @@
 			    if (!ptrp->p) {
 				if (!patinlen)
 				    patinlen = strlen((char *)patinstart)+1;
-				ptrp->p = (unsigned char *)zcalloc(patinlen);
+				ptrp->p = (unsigned char *)zshcalloc(patinlen);
 				pfree = 1;
 			    }
 			    ptr = ptrp->p + (patinput - patinstart);
Index: Src/prompt.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/prompt.c,v
retrieving revision 1.5.4.4
diff -u -r1.5.4.4 prompt.c
--- Src/prompt.c	26 Jun 2001 06:01:47 -0000	1.5.4.4
+++ Src/prompt.c	28 Oct 2003 15:22:04 -0000
@@ -171,7 +171,7 @@
     rstring = rs;
     Rstring = Rs;
     fm = s;
-    bp = bufline = buf = zcalloc(bufspc = 256);
+    bp = bufline = buf = zshcalloc(bufspc = 256);
     bp1 = NULL;
     trunclen = 0;
     putpromptchar(1, '\0');
Index: Src/utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/utils.c,v
retrieving revision 1.30.4.7
diff -u -r1.30.4.7 utils.c
--- Src/utils.c	1 Aug 2003 16:30:23 -0000	1.30.4.7
+++ Src/utils.c	28 Oct 2003 15:22:04 -0000
@@ -293,7 +293,7 @@
     int t0;
 
     if (!*s)
-	return (char **) zcalloc(sizeof(char **));
+	return (char **) zshcalloc(sizeof(char **));
 
     for (t = s, t0 = 0; *t; t++)
 	if (*t == '/')
@@ -541,7 +541,7 @@
     }
 
     /* add the name */
-    nd = (Nameddir) zcalloc(sizeof *nd);
+    nd = (Nameddir) zshcalloc(sizeof *nd);
     nd->flags = flags;
     nd->dir = ztrdup(t);
     /* The variables PWD and OLDPWD are not to be displayed as ~PWD etc. */
@@ -1771,7 +1771,7 @@
 	len += strlen(*s) + 1;
     if (!len)
 	return heap? "" : ztrdup("");
-    ptr = ret = (heap ? (char *) hcalloc(len) : (char *) zcalloc(len));
+    ptr = ret = (heap ? (char *) hcalloc(len) : (char *) zshcalloc(len));
     for (s = arr; *s; s++) {
 	strucpy(&ptr, *s);
 	if (delim)
@@ -1841,7 +1841,7 @@
     int l = sizeof(*ret) * (wordcount(s, NULL, -!allownull) + 1);
     char *(*dup)(const char *) = (heap ? dupstring : ztrdup);
 
-    ptr = ret = (heap ? (char **) hcalloc(l) : (char **) zcalloc(l));
+    ptr = ret = (heap ? (char **) hcalloc(l) : (char **) zshcalloc(l));
 
     if (quote) {
 	/*
@@ -1868,7 +1868,7 @@
 	findsep(&s, NULL, quote);
 	if (s > t || allownull) {
 	    *ptr = (heap ? (char *) hcalloc((s - t) + 1) :
-		    (char *) zcalloc((s - t) + 1));
+		    (char *) zshcalloc((s - t) + 1));
 	    ztrncpy(*ptr++, t, s - t);
 	} else
 	    *ptr++ = dup(nulstring);
@@ -2040,7 +2040,7 @@
     }
     sl = strlen(sep);
     for (t = s, l = 1 - sl; *t; l += strlen(*t) + sl, t++);
-    r = p = (heap ? (char *) hcalloc(l) : (char *) zcalloc(l));
+    r = p = (heap ? (char *) hcalloc(l) : (char *) zshcalloc(l));
     t = s;
     while (*t) {
 	strucpy(&p, *t);
@@ -2064,13 +2064,13 @@
     sl = strlen(sep);
     n = wordcount(s, sep, 1);
     r = p = (heap ? (char **) hcalloc((n + 1) * sizeof(char *)) :
-	     (char **) zcalloc((n + 1) * sizeof(char *)));
+	     (char **) zshcalloc((n + 1) * sizeof(char *)));
 
     for (t = s; n--;) {
 	tt = t;
 	findsep(&t, sep, 0);
 	*p = (heap ? (char *) hcalloc(t - tt + 1) :
-	      (char *) zcalloc(t - tt + 1));
+	      (char *) zshcalloc(t - tt + 1));
 	strncpy(*p, tt, t - tt);
 	(*p)[t - tt] = '\0';
 	p++;
Index: Src/Builtins/sched.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Builtins/sched.c,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 sched.c
--- Src/Builtins/sched.c	23 Feb 2000 15:18:47 -0000	1.1.1.7
+++ Src/Builtins/sched.c	28 Oct 2003 15:22:04 -0000
@@ -141,7 +141,7 @@
     }
     /* The time has been calculated; now add the new entry to the linked list
     of scheduled commands. */
-    sch = (struct schedcmd *) zcalloc(sizeof *sch);
+    sch = (struct schedcmd *) zshcalloc(sizeof *sch);
     sch->time = t;
     sch->cmd = zjoin(argv, ' ', 0);
     sch->next = NULL;
Index: Src/Modules/parameter.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/parameter.c,v
retrieving revision 1.20.4.2
diff -u -r1.20.4.2 parameter.c
--- Src/Modules/parameter.c	7 Mar 2003 12:31:44 -0000	1.20.4.2
+++ Src/Modules/parameter.c	28 Oct 2003 15:22:04 -0000
@@ -200,7 +200,7 @@
 	zwarn("restricted: %s", value, 0);
 	zsfree(value);
     } else {
-	Cmdnam cn = zcalloc(sizeof(*cn));
+	Cmdnam cn = zshcalloc(sizeof(*cn));
 
 	cn->flags = HASHED;
 	cn->u.cmd = value;
@@ -231,7 +231,7 @@
 
     for (i = 0; i < ht->hsize; i++)
 	for (hn = ht->nodes[i]; hn; hn = hn->next) {
-	    Cmdnam cn = zcalloc(sizeof(*cn));
+	    Cmdnam cn = zshcalloc(sizeof(*cn));
 	    struct value v;
 
 	    v.isarr = v.inv = v.start = 0;
@@ -1417,7 +1417,7 @@
     if (!value)
 	zwarn("invalid value: ''", NULL, 0);
     else {
-	Nameddir nd = (Nameddir) zcalloc(sizeof(*nd));
+	Nameddir nd = (Nameddir) zshcalloc(sizeof(*nd));
 
 	nd->flags = 0;
 	nd->dir = value;
@@ -1466,7 +1466,7 @@
 	    if (!(val = getstrvalue(&v)))
 		zwarn("invalid value: ''", NULL, 0);
 	    else {
-		Nameddir nd = (Nameddir) zcalloc(sizeof(*nd));
+		Nameddir nd = (Nameddir) zshcalloc(sizeof(*nd));
 
 		nd->flags = 0;
 		nd->dir = ztrdup(val);
Index: Src/Modules/stat.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/stat.c,v
retrieving revision 1.4
diff -u -r1.4 stat.c
--- Src/Modules/stat.c	11 May 2001 12:59:50 -0000	1.4
+++ Src/Modules/stat.c	28 Oct 2003 15:22:04 -0000
@@ -518,7 +518,7 @@
 	arrsize = (flags & STF_PICK) ? 1 : ST_COUNT;
 	if (flags & STF_FILE)
 	    arrsize++;
-	hashptr = hash = (char **)zcalloc((arrsize+1)*2*sizeof(char *));
+	hashptr = hash = (char **)zshcalloc((arrsize+1)*2*sizeof(char *));
     }
 
     if (arrnam) {
@@ -526,7 +526,7 @@
 	if (flags & STF_FILE)
 	    arrsize++;
 	arrsize *= nargs;
-	arrptr = array = (char **)zcalloc((arrsize+1)*sizeof(char *));
+	arrptr = array = (char **)zshcalloc((arrsize+1)*sizeof(char *));
     }
 
     for (; ops['f'] || *args; args++) {
Index: Src/Modules/zftp.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.c,v
retrieving revision 1.12.4.2
diff -u -r1.12.4.2 zftp.c
--- Src/Modules/zftp.c	25 Apr 2002 14:48:21 -0000	1.12.4.2
+++ Src/Modules/zftp.c	28 Oct 2003 15:22:04 -0000
@@ -2222,7 +2222,7 @@
 	return 0;
     }
     len = arrlen(args);
-    newarr = (char **)zcalloc((len+1)*sizeof(char *));
+    newarr = (char **)zshcalloc((len+1)*sizeof(char *));
     for (aptr = args, i = 0; *aptr && !errflag; aptr++, i++) {
 	char *str;
 	if (**aptr == '?')
@@ -2935,10 +2935,10 @@
     }
 
     if (!nptr) {
-	zfsess = (Zftp_session) zcalloc(sizeof(struct zftp_session));
+	zfsess = (Zftp_session) zshcalloc(sizeof(struct zftp_session));
 	zfsess->name = ztrdup(nm);
 	zfsess->cfd = zfsess->dfd = -1;
-	zfsess->params = (char **) zcalloc(sizeof(zfparams));
+	zfsess->params = (char **) zshcalloc(sizeof(zfparams));
 	zaddlinknode(zfsessions, zfsess);
 
 	zfsesscnt++;
Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.45.4.3
diff -u -r1.45.4.3 compcore.c
--- Src/Zle/compcore.c	10 Feb 2002 17:24:06 -0000	1.45.4.3
+++ Src/Zle/compcore.c	28 Oct 2003 15:22:04 -0000
@@ -616,7 +616,7 @@
 		untokenize(*q = ztrdup(*p));
 	    *q = NULL;
 	} else
-	    compwords = (char **) zcalloc(sizeof(char *));
+	    compwords = (char **) zshcalloc(sizeof(char *));
 
 	compparameter = ztrdup(compparameter);
 	compredirect = ztrdup(compredirect);
@@ -2706,7 +2706,7 @@
 {
     Cmatch r;
 
-    r = (Cmatch) zcalloc(sizeof(struct cmatch));
+    r = (Cmatch) zshcalloc(sizeof(struct cmatch));
 
     r->str = ztrdup(m->str);
     r->ipre = ztrdup(m->ipre);
@@ -2803,7 +2803,7 @@
 	    if (g->mcount > 1)
 		diffmatches = 1;
 
-	    n = (Cmgroup) zcalloc(sizeof(struct cmgroup));
+	    n = (Cmgroup) zshcalloc(sizeof(struct cmgroup));
 
 	    if (g->perm) {
 		g->perm->next = NULL;
@@ -2821,7 +2821,7 @@
 	    n->num = gn++;
 	    n->flags = g->flags;
 	    n->mcount = g->mcount;
-	    n->matches = p = (Cmatch *) zcalloc((n->mcount + 1) * sizeof(Cmatch));
+	    n->matches = p = (Cmatch *) zshcalloc((n->mcount + 1) * sizeof(Cmatch));
 	    n->name = ztrdup(g->name);
 	    for (q = g->matches; *q; q++, p++)
 		*p = dupmatch(*q, nbrbeg, nbrend);
@@ -2835,9 +2835,9 @@
 		n->ylist = NULL;
 
 	    if ((n->ecount = g->ecount)) {
-		n->expls = ep = (Cexpl *) zcalloc((n->ecount + 1) * sizeof(Cexpl));
+		n->expls = ep = (Cexpl *) zshcalloc((n->ecount + 1) * sizeof(Cexpl));
 		for (eq = g->expls; (o = *eq); eq++, ep++) {
-		    *ep = e = (Cexpl) zcalloc(sizeof(struct cexpl));
+		    *ep = e = (Cexpl) zshcalloc(sizeof(struct cexpl));
 		    e->count = (fi ? o->fcount : o->count);
 		    e->fcount = 0;
 		    e->str = ztrdup(o->str);
Index: Src/Zle/compctl.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compctl.c,v
retrieving revision 1.10.4.1
diff -u -r1.10.4.1 compctl.c
--- Src/Zle/compctl.c	23 Nov 2001 19:34:54 -0000	1.10.4.1
+++ Src/Zle/compctl.c	28 Oct 2003 15:22:05 -0000
@@ -242,7 +242,7 @@
 	if (ops['A'] && !ops['e']) {
 	    /* the -A option means that one array is specified, instead of
 	    many parameters */
-	    char **p, **b = (char **)zcalloc((clwnum + 1) * sizeof(char *));
+	    char **p, **b = (char **)zshcalloc((clwnum + 1) * sizeof(char *));
 
 	    for (i = 0, p = b; i < clwnum; p++, i++)
 		*p = ztrdup(clwords[i]);
@@ -893,7 +893,7 @@
 		    cc->xor = &cc_default;
 	    } else {
 		/* more flags follow:  prepare to loop again */
-		cc->xor = (Compctl) zcalloc(sizeof(*cc));
+		cc->xor = (Compctl) zshcalloc(sizeof(*cc));
 		cc = cc->xor;
 		memset((void *)&cct, 0, sizeof(cct));
 		cct.mask2 = CC_CCCONT;
@@ -930,7 +930,7 @@
 	/* o keeps track of or's, m remembers the starting condition,
 	 * c is the current condition being parsed
 	 */
-	o = m = c = (Compcond) zcalloc(sizeof(*c));
+	o = m = c = (Compcond) zshcalloc(sizeof(*c));
 	/* Loop over each condition:  something like 's[...][...], p[...]' */
 	for (t = *argv; *t;) {
 	    while (*t == ' ')
@@ -1021,20 +1021,20 @@
 	    /* Allocate space for all the arguments of the conditions */
 	    if (c->type == CCT_POS ||
 		c->type == CCT_NUMWORDS) {
-		c->u.r.a = (int *)zcalloc(n * sizeof(int));
-		c->u.r.b = (int *)zcalloc(n * sizeof(int));
+		c->u.r.a = (int *)zshcalloc(n * sizeof(int));
+		c->u.r.b = (int *)zshcalloc(n * sizeof(int));
 	    } else if (c->type == CCT_CURSUF ||
 		       c->type == CCT_CURPRE ||
 		       c->type == CCT_QUOTE)
-		c->u.s.s = (char **)zcalloc(n * sizeof(char *));
+		c->u.s.s = (char **)zshcalloc(n * sizeof(char *));
 
 	    else if (c->type == CCT_RANGESTR ||
 		     c->type == CCT_RANGEPAT) {
-		c->u.l.a = (char **)zcalloc(n * sizeof(char *));
-		c->u.l.b = (char **)zcalloc(n * sizeof(char *));
+		c->u.l.a = (char **)zshcalloc(n * sizeof(char *));
+		c->u.l.b = (char **)zshcalloc(n * sizeof(char *));
 	    } else {
-		c->u.s.p = (int *)zcalloc(n * sizeof(int));
-		c->u.s.s = (char **)zcalloc(n * sizeof(char *));
+		c->u.s.p = (int *)zshcalloc(n * sizeof(int));
+		c->u.s.s = (char **)zshcalloc(n * sizeof(char *));
 	    }
 	    /* Now loop over the actual arguments */
 	    for (l = 0; *t == '['; l++, t++) {
@@ -1137,17 +1137,17 @@
 		t++;
 	    if (*t == ',') {
 		/* Another condition to `or' */
-		o->or = c = (Compcond) zcalloc(sizeof(*c));
+		o->or = c = (Compcond) zshcalloc(sizeof(*c));
 		o = c;
 		t++;
 	    } else if (*t) {
 		/* Another condition to `and' */
-		c->and = (Compcond) zcalloc(sizeof(*c));
+		c->and = (Compcond) zshcalloc(sizeof(*c));
 		c = c->and;
 	    }
 	}
 	/* Assign condition to current compctl */
-	*next = (Compctl) zcalloc(sizeof(*cc));
+	*next = (Compctl) zshcalloc(sizeof(*cc));
 	(*next)->cond = m;
 	argv++;
 	/* End of the condition; get the flags that go with it. */
@@ -1271,7 +1271,7 @@
      */
     Compctl c2;
 
-    c2 = (Compctl) zcalloc(sizeof *cc);
+    c2 = (Compctl) zshcalloc(sizeof *cc);
     c2->xor = cc->xor;
     c2->ext = cc->ext;
     c2->refc = 1;
@@ -1587,7 +1587,7 @@
 	if ((ret = get_gmatcher(name, argv)))
 	    return ret - 1;
 
-	cc = (Compctl) zcalloc(sizeof(*cc));
+	cc = (Compctl) zshcalloc(sizeof(*cc));
 	if (get_compctl(name, &argv, cc, 1, 0, 0)) {
 	    freecompctl(cc);
 	    return 1;
Index: Src/Zle/complete.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complete.c,v
retrieving revision 1.16.4.2
diff -u -r1.16.4.2 complete.c
--- Src/Zle/complete.c	24 Aug 2001 12:14:41 -0000	1.16.4.2
+++ Src/Zle/complete.c	28 Oct 2003 15:22:05 -0000
@@ -686,7 +686,7 @@
 	    e = wl;
 
 	i = e - b + 1;
-	p = (char **) zcalloc((i + 1) * sizeof(char *));
+	p = (char **) zshcalloc((i + 1) * sizeof(char *));
 
 	for (q = p, pp = compwords + b; i; i--, q++, pp++)
 	    *q = ztrdup(*pp);
@@ -1158,7 +1158,7 @@
 		*((char **) pm->u.data) = ztrdup("");
 	    } else if (PM_TYPE(pm->flags) == PM_ARRAY) {
 		freearray(*((char ***) pm->u.data));
-		*((char ***) pm->u.data) = zcalloc(sizeof(char *));
+		*((char ***) pm->u.data) = zshcalloc(sizeof(char *));
 	    } else if (PM_TYPE(pm->flags) == PM_HASHED) {
 		deleteparamtable(pm->u.hash);
 		pm->u.hash = NULL;
Index: Src/Zle/computil.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/computil.c,v
retrieving revision 1.58.4.6
diff -u -r1.58.4.6 computil.c
--- Src/Zle/computil.c	23 Apr 2003 18:52:50 -0000	1.58.4.6
+++ Src/Zle/computil.c	28 Oct 2003 15:22:05 -0000
@@ -124,7 +124,7 @@
     cd_state.showd = disp;
 
     while (*args) {
-	*setp = set = (Cdset) zcalloc(sizeof(*set));
+	*setp = set = (Cdset) zshcalloc(sizeof(*set));
 	setp = &(set->next);
 
 	if (!(ap = get_user_var(*args))) {
Index: Src/Zle/zle_keymap.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_keymap.c,v
retrieving revision 1.7
diff -u -r1.7 zle_keymap.c
--- Src/Zle/zle_keymap.c	19 Apr 2001 19:43:45 -0000	1.7
+++ Src/Zle/zle_keymap.c	28 Oct 2003 15:22:05 -0000
@@ -156,7 +156,7 @@
 static KeymapName
 makekeymapnamnode(Keymap keymap)
 {
-    KeymapName kmn = (KeymapName) zcalloc(sizeof(*kmn));
+    KeymapName kmn = (KeymapName) zshcalloc(sizeof(*kmn));
 
     kmn->keymap = keymap;
     return kmn;
@@ -201,7 +201,7 @@
 static Key
 makekeynode(Thingy t, char *str)
 {
-    Key k = (Key) zcalloc(sizeof(*k));
+    Key k = (Key) zshcalloc(sizeof(*k));
 
     k->bind = t;
     k->str = str;
@@ -230,7 +230,7 @@
 mod_export Keymap
 newkeymap(Keymap tocopy, char *kmname)
 {
-    Keymap km = zcalloc(sizeof(*km));
+    Keymap km = zshcalloc(sizeof(*km));
     int i;
 
     km->rc = 0;
Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.18
diff -u -r1.18 zle_main.c
--- Src/Zle/zle_main.c	17 May 2001 15:56:13 -0000	1.18
+++ Src/Zle/zle_main.c	28 Oct 2003 15:22:05 -0000
@@ -1141,7 +1141,7 @@
 
     incompfunc = incompctlfunc = hascompmod = 0;
 
-    clwords = (char **) zcalloc((clwsize = 16) * sizeof(char *));
+    clwords = (char **) zshcalloc((clwsize = 16) * sizeof(char *));
 
     return 0;
 }
Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.1.1.19.4.3
diff -u -r1.1.1.19.4.3 zle_refresh.c
--- Src/Zle/zle_refresh.c	12 Apr 2002 23:24:21 -0000	1.1.1.19.4.3
+++ Src/Zle/zle_refresh.c	28 Oct 2003 15:22:05 -0000
@@ -133,8 +133,8 @@
 	    free(nbuf);
 	    free(obuf);
 	}
-	nbuf = (char **)zcalloc((winh + 1) * sizeof(char *));
-	obuf = (char **)zcalloc((winh + 1) * sizeof(char *));
+	nbuf = (char **)zshcalloc((winh + 1) * sizeof(char *));
+	obuf = (char **)zshcalloc((winh + 1) * sizeof(char *));
 	nbuf[0] = (char *)zalloc(winw + 2);
 	obuf[0] = (char *)zalloc(winw + 2);
 
Index: Src/Zle/zle_thingy.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_thingy.c,v
retrieving revision 1.3
diff -u -r1.3 zle_thingy.c
--- Src/Zle/zle_thingy.c	11 Nov 2000 19:50:29 -0000	1.3
+++ Src/Zle/zle_thingy.c	28 Oct 2003 15:22:05 -0000
@@ -107,7 +107,7 @@
 static Thingy
 makethingynode(void)
 {
-    Thingy t = (Thingy) zcalloc(sizeof(*t));
+    Thingy t = (Thingy) zshcalloc(sizeof(*t));
 
     t->flags = DISABLED;
     return t;

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


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

* Re: NSS LDAP/TLS crashing
  2003-10-28 15:28     ` Peter Stephenson
@ 2003-10-28 15:46       ` Frederic Gobry
  2003-10-28 16:04       ` Frederic Gobry
  2003-10-28 16:19       ` Danek Duvall
  2 siblings, 0 replies; 10+ messages in thread
From: Frederic Gobry @ 2003-10-28 15:46 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, 217915

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

> So it looks like we now need to second-guess the zlib interface.  Here's
> a patch for 4.0; I will commit the 4.1 version directly.

I'm compiling the patched version.

> I'd be interested to see what difference, if any, this makes to the
> valgrind output.

Ok.

-- 
 Frédéric Gobry       SMARTDATA    	  
                      http://www.smartdata.ch/
 PGP: 5B44F4A5        Lausanne - Switzerland
                      +41 21 693 84 98

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: NSS LDAP/TLS crashing
  2003-10-28 15:28     ` Peter Stephenson
  2003-10-28 15:46       ` Frederic Gobry
@ 2003-10-28 16:04       ` Frederic Gobry
  2003-10-28 16:19       ` Danek Duvall
  2 siblings, 0 replies; 10+ messages in thread
From: Frederic Gobry @ 2003-10-28 16:04 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, 217915


[-- Attachment #1.1: Type: text/plain, Size: 295 bytes --]

Excellent, the patch solves the crash :-) However, there are still
invalid writes (see attachment).

Frédéric

-- 
 Frédéric Gobry       SMARTDATA    	  
                      http://www.smartdata.ch/
 PGP: 5B44F4A5        Lausanne - Switzerland
                      +41 21 693 84 98

[-- Attachment #1.2: zsh-valgrind --]
[-- Type: text/plain, Size: 8575 bytes --]

==25377== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux.
==25377== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward.
==25377== Using valgrind-20030725, a program supervision framework for x86-linux.
==25377== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward.
==25377== Estimated CPU clock rate is 600 MHz
==25377== For more details, rerun with: -v
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x41008ABA: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==25377==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x41008B05: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==25377==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==25378== 
==25378== Invalid write of size 4
==25378==    at 0x805DFF1: (within /bin/zsh4)
==25378==    by 0x805E513: execute (in /bin/zsh4)
==25378==    by 0x8061831: (within /bin/zsh4)
==25378==    by 0x805FE2C: (within /bin/zsh4)
==25378==    Address 0x40C96110 is 0 bytes after a block of size 176 alloc'd
==25378==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==25378==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==25378==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==25378==    by 0x808955B: addenv (in /bin/zsh4)
==25379== 
==25379== Invalid write of size 4
==25379==    at 0x805DFF1: (within /bin/zsh4)
==25379==    by 0x805E513: execute (in /bin/zsh4)
==25379==    by 0x8061831: (within /bin/zsh4)
==25379==    by 0x805FE2C: (within /bin/zsh4)
==25379==    Address 0x40C96110 is 0 bytes after a block of size 176 alloc'd
==25379==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==25379==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==25379==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==25379==    by 0x808955B: addenv (in /bin/zsh4)
==25380== 
==25380== Invalid write of size 4
==25380==    at 0x805DFF1: (within /bin/zsh4)
==25380==    by 0x805E513: execute (in /bin/zsh4)
==25380==    by 0x8061831: (within /bin/zsh4)
==25380==    by 0x805FE2C: (within /bin/zsh4)
==25380==    Address 0x40C96110 is 0 bytes after a block of size 176 alloc'd
==25380==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==25380==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==25380==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==25380==    by 0x808955B: addenv (in /bin/zsh4)
==25381== discard syms in /lib/libnss_compat-2.3.2.so due to munmap()
==25381== discard syms in /lib/libnss_nis-2.3.2.so due to munmap()
==25381== discard syms in /lib/libnss_files-2.3.2.so due to munmap()
==25381== 
==25381== ERROR SUMMARY: 14 errors from 2 contexts (suppressed: 0 from 0)
==25381== malloc/free: in use at exit: 241444 bytes in 10216 blocks.
==25381== malloc/free: 15820 allocs, 5604 frees, 1865417 bytes allocated.
==25381== For a detailed leak analysis,  rerun with: --leak-check=yes
==25381== For counts of detected errors, rerun with: -v
==25382== 
==25382== Invalid write of size 4
==25382==    at 0x805DFF1: (within /bin/zsh4)
==25382==    by 0x805E513: execute (in /bin/zsh4)
==25382==    by 0x8061831: (within /bin/zsh4)
==25382==    by 0x805FE2C: (within /bin/zsh4)
==25382==    Address 0x40C96110 is 0 bytes after a block of size 176 alloc'd
==25382==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==25382==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==25382==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==25382==    by 0x808955B: addenv (in /bin/zsh4)
==25383== 
==25383== Invalid write of size 4
==25383==    at 0x805DFF1: (within /bin/zsh4)
==25383==    by 0x805E513: execute (in /bin/zsh4)
==25383==    by 0x8061831: (within /bin/zsh4)
==25383==    by 0x805FE2C: (within /bin/zsh4)
==25383==    Address 0x40C96110 is 0 bytes after a block of size 176 alloc'd
==25383==    at 0x40015CE9: realloc (vg_replace_malloc.c:299)
==25383==    by 0x4104258C: (within /lib/libc-2.3.2.so)
==25383==    by 0x410424B7: putenv (in /lib/libc-2.3.2.so)
==25383==    by 0x808955B: addenv (in /bin/zsh4)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x4210E154: __memp_fopen_int_4001 (in /usr/lib/libdb-4.1.so)
==25377==    by 0x4210DB93: (within /usr/lib/libdb-4.1.so)
==25377==    by 0x420C73D3: __db_dbenv_setup_4001 (in /usr/lib/libdb-4.1.so)
==25377==    by 0x420D6E8F: __db_dbopen_4001 (in /usr/lib/libdb-4.1.so)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x4100896A: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==25377==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x41008976: _dl_relocate_object_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DD70: (within /lib/libc-2.3.2.so)
==25377==    by 0x4100B115: _dl_catch_error_internal (in /lib/ld-2.3.2.so)
==25377==    by 0x4111DFDB: _dl_open (in /lib/libc-2.3.2.so)
==25377== 
==25377== Syscall param open(pathname) contains uninitialised or unaddressable byte(s)
==25377==    at 0x410E1778: __libc_open (in /lib/libc-2.3.2.so)
==25377==    by 0x41081207: _IO_file_fopen (in /lib/libc-2.3.2.so)
==25377==    by 0x4107745C: (within /lib/libc-2.3.2.so)
==25377==    by 0x410774BD: _IO_fopen (in /lib/libc-2.3.2.so)
==25377==    Address 0x0 is not stack'd, malloc'd or free'd
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x423E2008: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423BA982: (within /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423BAD7E: gcry_sexp_build (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x42320A14: (within /usr/lib/libgnutls.so.7.0.9)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x423E2008: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423BA982: (within /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423BAD7E: gcry_sexp_build (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x42320A34: (within /usr/lib/libgnutls.so.7.0.9)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x423E2008: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423BA982: (within /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423BAD7E: gcry_sexp_build (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x423C13C2: gcry_pk_encrypt (in /usr/lib/libgcrypt.so.1.5.1)
==25377== 
==25377== Conditional jump or move depends on uninitialised value(s)
==25377==    at 0x423E1F6C: gcry_mpi_print (in /usr/lib/libgcrypt.so.1.5.1)
==25377==    by 0x4232029C: _gnutls_mpi_print (in /usr/lib/libgnutls.so.7.0.9)
==25377==    by 0x4232FF1B: _gnutls_gen_dh_common_client_kx (in /usr/lib/libgnutls.so.7.0.9)
==25377==    by 0x4231BF2B: _gnutls_send_client_kx_message (in /usr/lib/libgnutls.so.7.0.9)
==25377== discard syms in /lib/libnss_compat-2.3.2.so due to munmap()
==25377== discard syms in /lib/libnss_nis-2.3.2.so due to munmap()
==25377== discard syms in /lib/libnss_ldap-2.3.2.so due to munmap()
==25377== discard syms in /usr/lib/libldap.so.2.0.122 due to munmap()
==25377== discard syms in /usr/lib/liblber.so.2.0.122 due to munmap()
==25377== discard syms in /usr/lib/libdb-4.1.so due to munmap()
==25377== discard syms in /usr/lib/libsasl2.so.2.0.15 due to munmap()
==25377== discard syms in /usr/lib/libgnutls.so.7.0.9 due to munmap()
==25377== discard syms in /lib/libcrypt-2.3.2.so due to munmap()
==25377== discard syms in /lib/libnss_files-2.3.2.so due to munmap()
==25377== discard syms in /lib/libnss_dns-2.3.2.so due to munmap()
==25377== 
==25377== ERROR SUMMARY: 62 errors from 10 contexts (suppressed: 0 from 0)
==25377== malloc/free: in use at exit: 1786659 bytes in 12714 blocks.
==25377== malloc/free: 28010 allocs, 15296 frees, 3831552 bytes allocated.
==25377== For a detailed leak analysis,  rerun with: --leak-check=yes
==25377== For counts of detected errors, rerun with: -v

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: NSS LDAP/TLS crashing
  2003-10-28 15:28     ` Peter Stephenson
  2003-10-28 15:46       ` Frederic Gobry
  2003-10-28 16:04       ` Frederic Gobry
@ 2003-10-28 16:19       ` Danek Duvall
  2003-11-03 13:13         ` Clint Adams
  2 siblings, 1 reply; 10+ messages in thread
From: Danek Duvall @ 2003-10-28 16:19 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers, 217915, Frédéric Gobry

On Tue, Oct 28, 2003 at 03:28:06PM +0000, Peter Stephenson wrote:

> Clint Adams wrote:
>
> > % objdump -T /usr/lib/libz.so.1 | grep zcal
> > 00008110 g    DF .text	00000018  Base        zcalloc
> 
> So it looks like we now need to second-guess the zlib interface.
> Here's a patch for 4.0; I will commit the 4.1 version directly.

One could argue that it's a bug in zlib.  zalloc() is not an interface
exposed from zlib.h, so presumably the function is private to the
library.  In which case the library should be built so that it's not
exposed outside the library.

Obviously zsh will still have to work around the bug where it might not
be fixed, but the bug should be reported.

I'm happy to, if no one else feels like it.  :)

Danek


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

* Re: NSS LDAP/TLS crashing
  2003-10-28 16:19       ` Danek Duvall
@ 2003-11-03 13:13         ` Clint Adams
  2003-11-05  4:21           ` Danek Duvall
  0 siblings, 1 reply; 10+ messages in thread
From: Clint Adams @ 2003-11-03 13:13 UTC (permalink / raw)
  To: Danek Duvall, Peter Stephenson, zsh-workers, 217915,
	Frédéric Gobry

> exposed from zlib.h, so presumably the function is private to the
> library.  In which case the library should be built so that it's not
> exposed outside the library.
> 
> Obviously zsh will still have to work around the bug where it might not
> be fixed, but the bug should be reported.
> 
> I'm happy to, if no one else feels like it.  :)

Please do.


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

* Re: NSS LDAP/TLS crashing
  2003-11-03 13:13         ` Clint Adams
@ 2003-11-05  4:21           ` Danek Duvall
  0 siblings, 0 replies; 10+ messages in thread
From: Danek Duvall @ 2003-11-05  4:21 UTC (permalink / raw)
  To: Clint Adams; +Cc: zsh-workers, 217915, Frédéric Gobry

On Mon, Nov 03, 2003 at 08:13:37AM -0500, Clint Adams wrote:

> > [...] but the bug should be reported.
> > 
> > I'm happy to, if no one else feels like it.  :)
> 
> Please do.

Done.  I also filed gentoo bug 32764.  I have a feeling it's all water
under the bridge, but for correctness' sake ...

Danek


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

end of thread, other threads:[~2003-11-05  4:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 13:02 NSS LDAP/TLS crashing Clint Adams
2003-10-28 14:09 ` Peter Stephenson
2003-10-28 14:25   ` Frederic Gobry
2003-10-28 14:30   ` Clint Adams
2003-10-28 15:28     ` Peter Stephenson
2003-10-28 15:46       ` Frederic Gobry
2003-10-28 16:04       ` Frederic Gobry
2003-10-28 16:19       ` Danek Duvall
2003-11-03 13:13         ` Clint Adams
2003-11-05  4:21           ` Danek Duvall

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).