zsh-workers
 help / color / mirror / code / Atom feed
From: Nicolas George <nicolas.george@ens.fr>
To: Clint Adams <clint@zsh.org>
Cc: zsh-workers@sunsite.dk, 249627@bugs.debian.org
Subject: Re: Bug#249627: Alias + LC_CTYPE + function => segmentation fault
Date: Tue, 18 May 2004 21:30:55 +0200	[thread overview]
Message-ID: <20040518193055.GB6702@clipper.ens.fr> (raw)
In-Reply-To: <20040518185734.GA8703@scowler.net>

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

Le decadi 30 floréal, an CCXII, Clint Adams a écrit :
> If you rebuild the deb with DEB_BUILD_OPTIONS="debug", you'll get some
> more verbose output from gdb.

I built only with ./configure, but I confess I did not check that the
build options enabled debugging, as they usually do with ./configure. I
re-tried with --enable-zsh-debug --enable-zsh-mem-debug
--enable-zsh-hash-debug. Here is the new backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x4011513c in mallopt () from /lib/tls/i686/cmov/libc.so.6
(gdb) where
#0  0x4011513c in mallopt () from /lib/tls/i686/cmov/libc.so.6
#1  0x080b3f30 in gettext2 (state=0x40aa6070) at text.c:343
Previous frame inner to this frame (corrupt stack?)

> zsh doesn't call mallopt() directly; it's probably being called from
> another libc function such as free().  Can you repeat the problem under
> valgrind with appropriate options?  Does it reveal anything?

I do not know valgrind, so I am not sure which are the appropriate
options, but a raw "HOME=/tmp/empty valgrind ./Src/zsh" gives sime
interesting details:

[snip a lot of initialization]
zsh: failed to load module: zsh/zle  <--- I did not make install
ssecem% alias frobnicate="LC_CTYPE=en_US.UTF-8"
ssecem% alias date="frobnicate date"
ssecem% function date { command date; echo done }
ssecem% date
==29387== Warning: invalid file descriptor -1 in syscall close()
==29387== Warning: invalid file descriptor -1 in syscall close()
Tue May 18 21:11:15 CEST 2004
done
ssecem% date
==29385== 
==29385== Invalid free() / delete / delete[]
==29385==    at 0x3C01F918: free (vg_replace_malloc.c:127)
==29385==    by 0x808DC1D: zsfree (mem.c:1399)
==29385==    by 0x809B2D1: delenv (params.c:3455)
==29385==    by 0x80698F3: save_params (exec.c:2523)
==29385==  Address 0x3C3C9B24 is 0 bytes inside a block of size 21 free'd
==29385==    at 0x3C01F918: free (vg_replace_malloc.c:127)
==29385==    by 0x808DC1D: zsfree (mem.c:1399)
==29385==    by 0x809B1A8: addenv (params.c:3402)
==29385==    by 0x8069C67: restore_params (exec.c:2594)
==29389== Warning: invalid file descriptor -1 in syscall close()
==29389== Warning: invalid file descriptor -1 in syscall close()
Tue May 18 21:11:17 CEST 2004
done

Again, I can make a core file available if you need it. I guess the
final core would be rather useless, since according to valgrind, the
memory is probably already corrupted at this point, but I can use gdb to
produce a core at the entrance of save_params.

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

  reply	other threads:[~2004-05-18 19:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040518152257.GA11291@clipper.ens.fr>
2004-05-18 15:53 ` Clint Adams
2004-05-18 16:39   ` Nicolas George
2004-05-18 18:57     ` Clint Adams
2004-05-18 19:30       ` Nicolas George [this message]
2004-05-19  9:57         ` Peter Stephenson
2004-05-19 17:36           ` Nicolas George

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040518193055.GB6702@clipper.ens.fr \
    --to=nicolas.george@ens.fr \
    --cc=249627@bugs.debian.org \
    --cc=clint@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).