zsh-workers
 help / color / mirror / code / Atom feed
From: Matthias Kopfermann <matthi@infodrom.north.de>
To: Zsh-Workers <zsh-workers@sunsite.dk>
Subject: crashing bug here with LANG=C printf "%1.1f\n" 23.2
Date: Wed, 7 Jul 2004 02:46:45 +0200	[thread overview]
Message-ID: <20040707004644.GA9512@finlandia.infodrom.north.de> (raw)


Hi all,

for ((i=1;i<100;i+=.01)) ; { LANG=C printf "%1.1f\n" $i ; }
gives me a segfault instantly here.
the same can happen when just doing LANG='C' printf "%1.1f\n" 23.2

with message: BUG: attempt to free more than allocated.

when invoking gdb zsh core and doing bt, i get:


GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux"...Using host libthread_db library "/lib/libthread_db.so.1".

Core was generated by `zsh'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/parameter.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/parameter.so
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/zle.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/zle.so
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/complete.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/complete.so
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/zutil.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/zutil.so
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/complist.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/complist.so
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/pcre.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/pcre.so
Reading symbols from /usr/local/lib/zsh/4.2.0-dev-1/zsh/rlimits.so...done.
Loaded symbols for /usr/local/lib/zsh/4.2.0-dev-1/zsh/rlimits.so
#0  0x400f33ab in memset () from /lib/libc.so.6
(gdb) bt
#0  0x400f33ab in memset () from /lib/libc.so.6
#1  0x0808eb30 in zfree (p=0x845cfc0, sz=2056) at mem.c:1179
#2  0x0808ee4c in zsfree (p=0x845cfc0 'ÿ' <repeats 200 times>...) at mem.c:1251
#3  0x0809cd7f in delenv (x=0x845cfc0 'ÿ' <repeats 200 times>...)
    at params.c:3467
#4  0x0806957d in save_params (state=0xbffff6e0, pc=0x40018b30, 
    restore_p=0xbffff108, remove_p=0xbffff10c) at exec.c:2524
#5  0x08068f65 in execcmd (state=0xbffff6e0, input=0, output=0, how=18, 
    last1=2) at exec.c:2369
#6  0x08065b96 in execpline2 (state=0xbffff6e0, pcode=131, how=18, input=0, 
    output=0, last1=0) at exec.c:1274
#7  0x080650ea in execpline (state=0xbffff6e0, slcode=8194, how=18, last1=0)
    at exec.c:1064
#8  0x08064a5d in execlist (state=0xbffff6e0, dont_change_job=1, exiting=0)
    at exec.c:870
#9  0x08087d2f in execfor (state=0xbffff6e0, do_exec=0) at loop.c:159
#10 0x08068eb0 in execcmd (state=0xbffff6e0, input=0, output=0, how=18, 
    last1=2) at exec.c:2359
#11 0x08065b96 in execpline2 (state=0xbffff6e0, pcode=131, how=18, input=0, 
    output=0, last1=0) at exec.c:1274
#12 0x080650ea in execpline (state=0xbffff6e0, slcode=15362, how=18, last1=0)
    at exec.c:1064
#13 0x08064a5d in execlist (state=0xbffff6e0, dont_change_job=0, exiting=0)
    at exec.c:870
#14 0x08064787 in execode (p=0x40018ae0, dont_change_job=0, exiting=0)
    at exec.c:771
#15 0x0807ada6 in loop (toplevel=1, justonce=0) at init.c:165
#16 0x0807d564 in zsh_main (argc=1, argv=0xbffff7d4) at init.c:1274
#17 0x0805272e in main (argc=1, argv=0xbffff7d4) at main.c:93

hope this is helpful,

	Matthias


             reply	other threads:[~2004-07-07  0:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07  0:46 Matthias Kopfermann [this message]
2004-07-07  7:59 ` crashing bug here with LANG=C printf "%1.1f" 23.2 Oliver Kiddle
2004-07-07 14:52 ` PATCH: crashing bug here with LANG=C printf "%1.1f\n" 23.2 Peter Stephenson
2004-07-07 15:11   ` PATCH: test for crashing bug here with LANG=C printf Peter Stephenson
2004-07-07 16:22   ` PATCH: crashing bug here with LANG=C printf "%1.1f\n" 23.2 Bart Schaefer

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=20040707004644.GA9512@finlandia.infodrom.north.de \
    --to=matthi@infodrom.north.de \
    --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).