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

Re: Bug in history changes



Wayne Davison wrote:
> On Wed, 20 Feb 2002, Peter Stephenson wrote:
> > The latest version of the history code is causing zcalc to crash.
> 
> I'm ashamed to say that my last patch still left a stupid bug in
> prepnexthistent().  I just committed the following fix to CVS.

I'm still getting the crash after recompiling.


+13:06% zcalc
zsh: bus error (core dumped)  ./zsh
13:06(138)% gdb zsh core
GNU gdb 4.18
Copyright 1998 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 "sparc-sun-solaris2.6"...
Core was generated by `./zsh'.
Program terminated with signal 10, Bus Error.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/net/tcp.so...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/zle.so...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/complete.so...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/zutil.so...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/compctl.so...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/parameter.so...done.
Reading symbols from /home/pws/lib/zsh/4.1.0-dev-3/zsh/complist.so...done.
---Type <return> to continue, or q <return> to quit---
#0  0x3b168 in putoldhistentryontop (keep_going=10504) at ../../Src/hist.c:937
937             he->up->down = he->down;
(gdb) bt
#0  0x3b168 in putoldhistentryontop (keep_going=10504) at ../../Src/hist.c:937
#1  0x3cdac in resizehistents () at ../../Src/hist.c:1777
#2  0x5d92c in histsizesetfn (pm=0x9b2a8, v=4294967296)
    at ../../Src/params.c:2915
#3  0x5a690 in setstrvalue (v=0xffbee7e8, val=0xf52d8 "0")
    at ../../Src/params.c:1637
#4  0x5b6a8 in assignsparam (s=0xbbf58 "", val=0xf52d8 "0", augment=0)
    at ../../Src/params.c:1991
#5  0x1eecc in typeset_single (cname=0xbbf48 "local", 
    pname=0xbbf50 "HISTSIZE", pm=0x9b2a8, func=0, on=131072, off=0, roff=0, 
    value=0xbbf59 "0", altpm=0x0) at ../../Src/builtin.c:1875
#6  0x20358 in bin_typeset (name=0xbbf48 "local", argv=0xffbee9b4, 
    ops=0xffbee9c8 "", func=0) at ../../Src/builtin.c:2134
#7  0x1aa04 in execbuiltin (args=0xbbf28, bn=0x99bc8)
    at ../../Src/builtin.c:377
#8  0x2dec0 in execcmd (state=0xffbeed78, input=0, output=0, how=2, last1=2)
    at ../../Src/exec.c:2306
#9  0x2b21c in execpline2 (state=0xffbeed78, pcode=192, how=2, input=0, 
    output=0, last1=0) at ../../Src/exec.c:1201
#10 0x2a770 in execpline (state=0xffbeed78, slcode=128, how=2, last1=0)
    at ../../Src/exec.c:991
#11 0x2a210 in execlist (state=0xffbeed78, dont_change_job=1, exiting=0)
    at ../../Src/exec.c:826
---Type <return> to continue, or q <return> to quit---
#12 0x29f18 in execode (p=0xf38c0, dont_change_job=1, exiting=0)
    at ../../Src/exec.c:729
#13 0x2ff14 in execautofn (state=0xd5d60, do_exec=0) at ../../Src/exec.c:3245
#14 0x2dc74 in execcmd (state=0xffbef128, input=0, output=0, how=18, last1=2)
    at ../../Src/exec.c:2253
#15 0x2b21c in execpline2 (state=0xffbef128, pcode=0, how=18, input=0, 
    output=0, last1=0) at ../../Src/exec.c:1201
#16 0x2a770 in execpline (state=0xffbef128, slcode=96, how=18, last1=0)
    at ../../Src/exec.c:991
#17 0x2a210 in execlist (state=0xffbef128, dont_change_job=1, exiting=0)
    at ../../Src/exec.c:826
#18 0x29f18 in execode (p=0xf3280, dont_change_job=1, exiting=0)
    at ../../Src/exec.c:729
#19 0x30598 in runshfunc (prog=0xf3280, wrap=0x0, name=0xbbd70 "zcalc")
    at ../../Src/exec.c:3492
#20 0x3035c in doshfunc (name=0xca4a8 "zcalc", prog=0xf3280, doshargs=0xf5300, 
    flags=0, noreturnval=0) at ../../Src/exec.c:3407
#21 0x2fea0 in execshfunc (shf=0xd5d60, args=0xbbd48) at ../../Src/exec.c:3217
#22 0x2de34 in execcmd (state=0xffbef668, input=0, output=0, how=18, last1=2)
    at ../../Src/exec.c:2295
#23 0x2b21c in execpline2 (state=0xffbef668, pcode=4, how=18, input=0, 
    output=0, last1=0) at ../../Src/exec.c:1201
#24 0x2a770 in execpline (state=0xffbef668, slcode=96, how=18, last1=0)
---Type <return> to continue, or q <return> to quit---
    at ../../Src/exec.c:991
#25 0x2a210 in execlist (state=0xffbef668, dont_change_job=0, exiting=0)
    at ../../Src/exec.c:826
#26 0x29f18 in execode (p=0xbbd00, dont_change_job=0, exiting=0)
    at ../../Src/exec.c:729
#27 0x3e310 in loop (toplevel=1, justonce=0) at ../../Src/init.c:165
#28 0x40a38 in zsh_main (argc=1, argv=0x1) at ../../Src/init.c:1214
#29 0x1a220 in main (argc=1, argv=0xffbef83c) at ../../Src/main.c:37
(gdb) l
932                 he = next;
933                 next = he->down;
934             } while (he != hist_ring->down && !(he->flags & HIST_DUP));
935         }
936         if (he != hist_ring->down) {
937             he->up->down = he->down;
938             he->down->up = he->up;
939             he->up = hist_ring;
940             he->down = hist_ring->down;
941             hist_ring->down = he->down->up = he;

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


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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