From vcrhonek at redhat.com Mon Jun 8 13:02:31 2009 From: vcrhonek at redhat.com (Vitezslav Crhonek) Date: Mon, 8 Jun 2009 06:02:31 -0400 (EDT) Subject: Multi-byte char issue In-Reply-To: <1364124321.1112401244042926508.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Message-ID: <861891797.1412111244455351641.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Hi, When tcsh re-allocates heap memory in short2str() function, it sets a pointer on wrong position. Similar problem is in short2qstr() function. When new buffer is allocated, pointer to actual is wrongly set to the start of the block. This causes overwriting of last character. Patch attached. Best regards, Vitezslav Crhonek From vcrhonek at redhat.com Mon Jun 8 18:31:37 2009 From: vcrhonek at redhat.com (Vitezslav Crhonek) Date: Mon, 8 Jun 2009 11:31:37 -0400 (EDT) Subject: Multi-byte char issue In-Reply-To: <227774756.1421801244462879072.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Message-ID: <978026809.1470281244475097013.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sorry, the patch follows. --- tc.str.c.wide-str 2008-05-14 22:10:30.000000000 +0200 +++ tc.str.c 2009-06-03 17:05:15.000000000 +0200 @@ -154,7 +154,7 @@ { static char *sdst = NULL; static size_t dstsize = 0; - char *dst, *edst; + char *dst, *edst, *wdst, *wedst; if (src == NULL) return (NULL); @@ -171,8 +171,15 @@ if (dst >= edst) { dstsize += MALLOC_INCR; sdst = xrealloc(sdst, (dstsize + MALLOC_SURPLUS) * sizeof(char)); + wdst = dst; + wedst = edst; edst = &sdst[dstsize]; dst = &edst[-MALLOC_INCR]; + while (wdst > wedst) { + dst++; + wdst--; + } + } } *dst = 0; @@ -456,6 +463,7 @@ static char *sdst = NULL; static size_t dstsize = 0; char *dst, *edst; + int i; if (src == NULL) return (NULL); @@ -480,10 +488,11 @@ dst += one_wctomb(dst, *src & CHAR); src++; if (dst >= edst) { + i = dst - edst; dstsize += MALLOC_INCR; sdst = xrealloc(sdst, (dstsize + MALLOC_SURPLUS) * sizeof(char)); edst = &sdst[dstsize]; - dst = &edst[-MALLOC_INCR]; + dst = &edst[-MALLOC_INCR + i]; } } *dst = 0; ----- Original Message ----- From: "Vitezslav Crhonek" To: tcsh at mx.gw.com Sent: Monday, June 8, 2009 12:02:31 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Multi-byte char issue Hi, When tcsh re-allocates heap memory in short2str() function, it sets a pointer on wrong position. Similar problem is in short2qstr() function. When new buffer is allocated, pointer to actual is wrongly set to the start of the block. This causes overwriting of last character. Patch attached. Best regards, Vitezslav Crhonek _______________________________________________ Tcsh mailing list Tcsh at mx.gw.com http://mx.gw.com/mailman/listinfo/tcsh From christos at zoulas.com Mon Jun 8 21:06:18 2009 From: christos at zoulas.com (Christos Zoulas) Date: Mon, 8 Jun 2009 14:06:18 -0400 Subject: Multi-byte char issue In-Reply-To: <978026809.1470281244475097013.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> from Vitezslav Crhonek (Jun 8, 11:31am) Message-ID: <20090608180618.E0E6756551@rebar.astron.com> On Jun 8, 11:31am, vcrhonek at redhat.com (Vitezslav Crhonek) wrote: -- Subject: Re: Multi-byte char issue I applied your fix, thanks! christos From christos at zoulas.com Wed Jun 24 23:23:21 2009 From: christos at zoulas.com (Christos Zoulas) Date: Wed, 24 Jun 2009 16:23:21 -0400 Subject: tcsh-6.16.01 is now available Message-ID: <20090624202321.AE8FB56550@rebar.astron.com> Hello, It is on: ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz ftp://ftp.astron.com/pri/patch1.gz Please test it; if you don't see any problems I will release it next week. christos 14. V6.16.01 - 20090624 13. add missing sigemptyset in goodbye() 12. add rlimit swapsize from FreeBSD. 11. restore behavior where a[n-] never prints an error. 10. always save the whole command, not just the first 80 chars of it. 9. fix short2str/short2qstr length adjustment in wide chars (Vitezslav Crhonek) 8. set histfile=/tmp/history.temp; set savehist=(100 merge); alias precmd history -S. After that justpr is not restored and commands don't execute. (Andriy Gapon) 7. Fix "as" $ modifier from corrupting memory. set t=demfonsftraftionf; echo $t:as/f// 6. Make $% work with environment variable (Ron Johnston) 5. Dragonfly script support (Matthias Schmidt, m65) 4. Add autoexpand=onlyhistory (Don Estabrook, m66) 3. Add history in loops (Lawrence Darby, m48) 2. Add missing colorls "rs" variable (Shlomi Fish, m70) 1. Fix pts detection issue (Ruslan Ermilov) From h.m.brand at xs4all.nl Thu Jun 25 09:18:06 2009 From: h.m.brand at xs4all.nl (H.Merijn Brand) Date: Thu, 25 Jun 2009 08:18:06 +0200 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090624202321.AE8FB56550@rebar.astron.com> References: <20090624202321.AE8FB56550@rebar.astron.com> Message-ID: <20090625081806.0123171a@pc09.procura.nl> On Wed, 24 Jun 2009 16:23:21 -0400, christos at zoulas.com (Christos Zoulas) wrote: > > Hello, > > It is on: > ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz Would you be so kind to prevent C99 (C++) style comments, as many compilers either don't do this by default or are unable to deal with it at all: in config_f.h I see: #if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) // # define SYSMALLOC #else // # undef SYSMALLOC #endif this is the only occurance. The other file, win32/support.c doesn't matter, as all known compilers on Windows do C99 style comments In the above case, it is maybe even better to just delete those 5 lines, as they now serve no purpose at all > ftp://ftp.astron.com/pri/patch1.gz > > Please test it; if you don't see any problems I will release it next week. > > christos > > 14. V6.16.01 - 20090624 > 13. add missing sigemptyset in goodbye() > 12. add rlimit swapsize from FreeBSD. > 11. restore behavior where a[n-] never prints an error. > 10. always save the whole command, not just the first 80 chars of it. > 9. fix short2str/short2qstr length adjustment in wide chars > (Vitezslav Crhonek) > 8. set histfile=/tmp/history.temp; set savehist=(100 merge); > alias precmd history -S. After that justpr is not restored and commands > don't execute. (Andriy Gapon) > 7. Fix "as" $ modifier from corrupting memory. > set t=demfonsftraftionf; echo $t:as/f// > 6. Make $% work with environment variable (Ron Johnston) > 5. Dragonfly script support (Matthias Schmidt, m65) > 4. Add autoexpand=onlyhistory (Don Estabrook, m66) > 3. Add history in loops (Lawrence Darby, m48) > 2. Add missing colorls "rs" variable (Shlomi Fish, m70) > 1. Fix pts detection issue (Ruslan Ermilov) > > _______________________________________________ > Tcsh mailing list > Tcsh at mx.gw.com > http://mx.gw.com/mailman/listinfo/tcsh -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/ From h.m.brand at xs4all.nl Thu Jun 25 09:41:40 2009 From: h.m.brand at xs4all.nl (H.Merijn Brand) Date: Thu, 25 Jun 2009 08:41:40 +0200 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090624202321.AE8FB56550@rebar.astron.com> References: <20090624202321.AE8FB56550@rebar.astron.com> Message-ID: <20090625084140.29454c46@pc09.procura.nl> On Wed, 24 Jun 2009 16:23:21 -0400, christos at zoulas.com (Christos Zoulas) wrote: > > Hello, > > It is on: > ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz The number of entries in ~/.netrc causes "Abort" messages: tcsh-6.16.01 106 > ./tcsh Abort Which, when run with -V, shows: --8<--- set autolist=ambiguous set noglob set hosts foreach _f ( $HOME/.hosts /etc/csh.hosts $HOME/.rhosts /etc/hosts.equiv ) if ( -r $_f ) then end if ( -r $_f ) then end if ( -r $_f ) then set hosts= ( $hosts `grep -E -shv '^#|\+' $_f |awk '{ print $1 }'` ) endif end if ( -r $_f ) then set hosts= ( $hosts `grep -E -shv '^#|\+' $_f |awk '{ print $1 }'` ) endif end if ( -r $HOME/.netrc ) then set _f=`awk '/machine/ { print $2 }' < $HOME/.netrc` > & /dev/null set hosts= ( $hosts $_f ) endif set hosts= ( `echo $hosts localhost $HOSTNAME|tr ' ' '\n'|sort -u -t '.'` ) Abort unset _f set _maildir = /var/spool/mail set _ypdir = /var/yp set _domain = "`domainname`" if ( $?MANPATH ) then set _manpath="{${MANPATH:as/:/,/}}/{man,cat}" else -->8--- That part is *NOT* in my .tcshrc, but in the OpenSUSE 11.0 version of /etc/profile.d/complete.tcsh --8<--- /etc/profile.d 118 > head -27 complete.tcsh # # complete.tcsh Define some intelligent command completions # # Modified version of complete.tcsh (1993) found in the source code # the tcsh-6.03. Complemented with the following versions and extend # with other features. This was a part of csh.cshrc until 1999/06/25. # # Author: 1993-99 Werner Fink # # 1999/06/28: resort to the order to fit complete.tcsh # found in tcsh-6.08.05, add the mh completes. # set autolist=ambiguous set noglob # set hosts foreach _f ($HOME/.hosts /etc/csh.hosts $HOME/.rhosts /etc/hosts.equiv) if ( -r $_f ) then set hosts=($hosts `grep -E -shv '^#|\+' $_f |awk '{ print $1 }'`) endif end if ( -r $HOME/.netrc ) then set _f=`awk '/machine/ { print $2 }' < $HOME/.netrc` >& /dev/null set hosts=($hosts $_f) endif set hosts=(`echo $hosts localhost $HOSTNAME|tr ' ' '\n'|sort -u -t '.'`) unset _f -->8--- tcsh-6.16.01 107 > awk '/machine/ { print $2 }' < $HOME/.netrc | wc -l 214 If I cut down that number to say 20, all goes well > ftp://ftp.astron.com/pri/patch1.gz > > Please test it; if you don't see any problems I will release it next week. > > christos > > 14. V6.16.01 - 20090624 > 13. add missing sigemptyset in goodbye() > 12. add rlimit swapsize from FreeBSD. > 11. restore behavior where a[n-] never prints an error. > 10. always save the whole command, not just the first 80 chars of it. > 9. fix short2str/short2qstr length adjustment in wide chars > (Vitezslav Crhonek) > 8. set histfile=/tmp/history.temp; set savehist=(100 merge); > alias precmd history -S. After that justpr is not restored and commands > don't execute. (Andriy Gapon) > 7. Fix "as" $ modifier from corrupting memory. > set t=demfonsftraftionf; echo $t:as/f// > 6. Make $% work with environment variable (Ron Johnston) > 5. Dragonfly script support (Matthias Schmidt, m65) > 4. Add autoexpand=onlyhistory (Don Estabrook, m66) > 3. Add history in loops (Lawrence Darby, m48) > 2. Add missing colorls "rs" variable (Shlomi Fish, m70) > 1. Fix pts detection issue (Ruslan Ermilov) -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/ From pk at q-leap.com Thu Jun 25 13:30:37 2009 From: pk at q-leap.com (Peter Kruse) Date: Thu, 25 Jun 2009 12:30:37 +0200 (CEST) Subject: tcsh-6.16.01 is now available In-Reply-To: <20090624202321.AE8FB56550@rebar.astron.com> References: <20090624202321.AE8FB56550@rebar.astron.com> Message-ID: Hello, under Linux I get: free(0x8dda808) bad range check. (memtop = 0x9246999 membot = 0x8dbe000) Abort when running ls -lrt dist/L26P* the pattern resolves to 25 files on an nfs mounted filesystem. echo $version: tcsh 6.16.0.1 (Astron) 2009-06-24 (i386-intel-linux) options wide,nls,dl,al,kan,rh,color,filec $ ldd tcsh linux-gate.so.1 => (0x00e6c000) libtinfo.so.5 => /lib/libtinfo.so.5 (0x07909000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x07bdc000) libc.so.6 => /lib/libc.so.6 (0x0067e000) /lib/ld-linux.so.2 (0x00659000) compiled with gcc 4.2.1. Regards, Peter > > Hello, > > It is on: > ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz > ftp://ftp.astron.com/pri/patch1.gz > > Please test it; if you don't see any problems I will release it next week. > > christos > > 14. V6.16.01 - 20090624 > 13. add missing sigemptyset in goodbye() > 12. add rlimit swapsize from FreeBSD. > 11. restore behavior where a[n-] never prints an error. > 10. always save the whole command, not just the first 80 chars of it. > 9. fix short2str/short2qstr length adjustment in wide chars > (Vitezslav Crhonek) > 8. set histfile=/tmp/history.temp; set savehist=(100 merge); > alias precmd history -S. After that justpr is not restored and > commands > don't execute. (Andriy Gapon) > 7. Fix "as" $ modifier from corrupting memory. > set t=demfonsftraftionf; echo $t:as/f// > 6. Make $% work with environment variable (Ron Johnston) > 5. Dragonfly script support (Matthias Schmidt, m65) > 4. Add autoexpand=onlyhistory (Don Estabrook, m66) > 3. Add history in loops (Lawrence Darby, m48) > 2. Add missing colorls "rs" variable (Shlomi Fish, m70) > 1. Fix pts detection issue (Ruslan Ermilov) > > _______________________________________________ > Tcsh mailing list > Tcsh at mx.gw.com > http://mx.gw.com/mailman/listinfo/tcsh > > From christos at zoulas.com Thu Jun 25 15:10:15 2009 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 25 Jun 2009 08:10:15 -0400 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625081806.0123171a@pc09.procura.nl> from "H.Merijn Brand" (Jun 25, 8:18am) Message-ID: <20090625121015.A08155654E@rebar.astron.com> On Jun 25, 8:18am, h.m.brand at xs4all.nl ("H.Merijn Brand") wrote: -- Subject: Re: tcsh-6.16.01 is now available | On Wed, 24 Jun 2009 16:23:21 -0400, christos at zoulas.com (Christos | Zoulas) wrote: | | > | > Hello, | > | > It is on: | > ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz | | Would you be so kind to prevent C99 (C++) style comments, as many | compilers either don't do this by default or are unable to deal with it | at all: | | in config_f.h I see: | | #if defined(__MACHTEN__) || defined(PURIFY) || defined(MALLOC_TRACE) || defined(_OSD_POSIX) || defined(__MVS__) | // # define SYSMALLOC | #else | // # undef SYSMALLOC | #endif | | this is the only occurance. The other file, win32/support.c doesn't | matter, as all known compilers on Windows do C99 style comments | | In the above case, it is maybe even better to just delete those 5 | lines, as they now serve no purpose at all Actually this was not supposed to be committed and the comments should just be removed. christos From christos at zoulas.com Thu Jun 25 15:14:53 2009 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 25 Jun 2009 08:14:53 -0400 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625084140.29454c46@pc09.procura.nl> from "H.Merijn Brand" (Jun 25, 8:41am) Message-ID: <20090625121453.E94DD5654E@rebar.astron.com> On Jun 25, 8:41am, h.m.brand at xs4all.nl ("H.Merijn Brand") wrote: -- Subject: Re: tcsh-6.16.01 is now available | On Wed, 24 Jun 2009 16:23:21 -0400, christos at zoulas.com (Christos | Zoulas) wrote: | | > | > Hello, | > | > It is on: | > ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz | | The number of entries in ~/.netrc causes "Abort" messages: | | tcsh-6.16.01 106 > ./tcsh | Abort Can you get a core file, and give me a backtrace with gdb? christos From christos at zoulas.com Thu Jun 25 15:18:22 2009 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 25 Jun 2009 08:18:22 -0400 Subject: tcsh-6.16.01 is now available In-Reply-To: from "Peter Kruse" (Jun 25, 12:30pm) Message-ID: <20090625121822.DC0C05654E@rebar.astron.com> On Jun 25, 12:30pm, pk at q-leap.com ("Peter Kruse") wrote: -- Subject: Re: tcsh-6.16.01 is now available | Hello, | | under Linux I get: | | free(0x8dda808) bad range check. (memtop = 0x9246999 membot = 0x8dbe000) | Abort | | when running | | ls -lrt dist/L26P* | | the pattern resolves to 25 files on an nfs mounted filesystem. | echo $version: | Well, something is trashing memory. Now to find out what... christos From h.m.brand at xs4all.nl Thu Jun 25 15:30:24 2009 From: h.m.brand at xs4all.nl (H.Merijn Brand) Date: Thu, 25 Jun 2009 14:30:24 +0200 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625121453.E94DD5654E@rebar.astron.com> References: <20090625084140.29454c46@pc09.procura.nl> <20090625121453.E94DD5654E@rebar.astron.com> Message-ID: <20090625143024.0defed24@pc09.procura.nl> On Thu, 25 Jun 2009 08:14:53 -0400, christos at zoulas.com (Christos Zoulas) wrote: > On Jun 25, 8:41am, h.m.brand at xs4all.nl ("H.Merijn Brand") wrote: > -- Subject: Re: tcsh-6.16.01 is now available > > | On Wed, 24 Jun 2009 16:23:21 -0400, christos at zoulas.com (Christos > | Zoulas) wrote: > | > | > > | > Hello, > | > > | > It is on: > | > ftp://ftp.astron.com/pri/tcsh-6.16.01.tar.gz > | > | The number of entries in ~/.netrc causes "Abort" messages: > | > | tcsh-6.16.01 106 > ./tcsh > | Abort > > Can you get a core file, and give me a backtrace with gdb? tcsh doesn't dump core, and starts. It just emits that message and continues tux:/pro/3gl/tcsh-6.16.01 107 > echo $version tcsh 6.16.00 (Astron) 2008-09-30 (x86_64-unknown-linux) options wide,nls,vi,kan,sm,rh,color,ccat,filec,procura tux:/pro/3gl/tcsh-6.16.01 108 > ./tcsh Abort tux:/pro/3gl/tcsh-6.16.01 101 > echo $version tcsh 6.16.01 (Astron) 2009-06-24 (x86_64-unknown-linux) options wide,nls,vi,kan,rh,color,ccat,filec,procura tux:/pro/3gl/tcsh-6.16.01 102 > -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/ From christos at zoulas.com Thu Jun 25 15:46:51 2009 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 25 Jun 2009 08:46:51 -0400 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625143024.0defed24@pc09.procura.nl> from "H.Merijn Brand" (Jun 25, 2:30pm) Message-ID: <20090625124651.E34A55654E@rebar.astron.com> On Jun 25, 2:30pm, h.m.brand at xs4all.nl ("H.Merijn Brand") wrote: -- Subject: Re: tcsh-6.16.01 is now available | tcsh doesn't dump core, and starts. It just emits that message and | continues Do you have the coredump limit set to 0? It is the child that dumps (the child of the backquotes). christos From h.m.brand at xs4all.nl Thu Jun 25 16:06:27 2009 From: h.m.brand at xs4all.nl (H.Merijn Brand) Date: Thu, 25 Jun 2009 15:06:27 +0200 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625124651.E34A55654E@rebar.astron.com> References: <20090625143024.0defed24@pc09.procura.nl> <20090625124651.E34A55654E@rebar.astron.com> Message-ID: <20090625150627.3f68663e@pc09.procura.nl> On Thu, 25 Jun 2009 08:46:51 -0400, christos at zoulas.com (Christos Zoulas) wrote: > On Jun 25, 2:30pm, h.m.brand at xs4all.nl ("H.Merijn Brand") wrote: > -- Subject: Re: tcsh-6.16.01 is now available > > | tcsh doesn't dump core, and starts. It just emits that message and > | continues > > Do you have the coredump limit set to 0? yes, sorry > It is the child that dumps (the child of the backquotes). Program terminated with signal 6, Aborted. [New process 23262] #0 0x00007fd99a9ce5c5 in raise () from /lib64/libc.so.6 (gdb) where #0 0x00007fd99a9ce5c5 in raise () from /lib64/libc.so.6 #1 0x00007fd99a9cfbb3 in abort () from /lib64/libc.so.6 #2 0x000000000043de8d in free (cp=0x69e008) at tc.alloc.c:313 #3 0x000000000043e215 in realloc (cp=0x69e008, nbytes=2066) at tc.alloc.c:431 #4 0x0000000000420171 in morecommand (s=) at sh.proc.c:686 #5 0x00000000004201e5 in pads (cp=0x6da408) at sh.proc.c:874 #6 0x0000000000420339 in padd (t=0x6dc5c8) at sh.proc.c:812 #7 0x0000000000420481 in palloc (pid=23263, t=0x6dc5c8) at sh.proc.c:731 #8 0x000000000042079a in pfork (t=0x6dc5c8, wanttty=-1) at sh.proc.c:1854 #9 0x0000000000421964 in execute (t=0x6dc5c8, wanttty=-1, pipein=0x0, pipeout=0x7fffa338d880, do_glob=1) at sh.sem.c:393 #10 0x0000000000421c44 in execute (t=0x6dc608, wanttty=-1, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:682 #11 0x0000000000421d07 in execute (t=0x6dc648, wanttty=-1, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:720 #12 0x00000000004161c3 in backeval (bb=0x7fffa3392c40, word=0x7fffa3392c60, cp=0x6d41f0, literal=0) at sh.glob.c:790 #13 0x00000000004165f4 in dobackp (cp=0x6893f8, literal=0) at sh.glob.c:675 #14 0x0000000000416a48 in globexpand (v=0x6cc790, noglob=1) at sh.glob.c:315 #15 0x0000000000416e6a in globall (v=0x6cc788, gflg=2) at sh.glob.c:541 #16 0x000000000042379a in set1 (var=0x6dca08, vec=0x6cc788, head=0x670a80, flags=) at sh.set.c:640 #17 0x00000000004247a8 in doset (v=0x6dca70, c=) at sh.set.c:306 #18 0x0000000000422131 in execute (t=0x6aed88, wanttty=23245, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:632 #19 0x0000000000421d07 in execute (t=0x6aa988, wanttty=23245, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:720 #20 0x000000000040412a in process (catch=0) at sh.c:2003 #21 0x00000000004048eb in srcunit (unit=7, onlyown=, hflg=0, av=0x6d30e8) at sh.c:1624 #22 0x0000000000404c12 in srcfile (f=, onlyown=0, flag=0, av=0x6d30e8) at sh.c:1416 #23 0x0000000000404cee in dosource (t=0xffffffffffffffff, c=) at sh.c:2048 #24 0x0000000000422131 in execute (t=0x6cbe08, wanttty=23245, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:632 #25 0x0000000000421d07 in execute (t=0x6cbe48, wanttty=23245, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:720 #26 0x000000000040412a in process (catch=0) at sh.c:2003 #27 0x00000000004048eb in srcunit (unit=6, onlyown=, hflg=0, av=0x0) at sh.c:1624 #28 0x0000000000404c12 in srcfile (f=, onlyown=0, flag=0, av=0x0) at sh.c:1416 #29 0x00000000004064a0 in main (argc=0, argv=0x7fffa3396148) at sh.c:1225 (gdb) -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/ From pk at q-leap.com Thu Jun 25 16:31:37 2009 From: pk at q-leap.com (Peter Kruse) Date: Thu, 25 Jun 2009 15:31:37 +0200 (CEST) Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625121822.DC0C05654E@rebar.astron.com> References: <20090625121822.DC0C05654E@rebar.astron.com> Message-ID: <674da64241768bb63814903e97b455aa.squirrel@www.q-leap.de> > On Jun 25, 12:30pm, pk at q-leap.com ("Peter Kruse") wrote: > > Well, something is trashing memory. Now to find out what... HTH: Program received signal SIGABRT, Aborted. 0x00187416 in __kernel_vsyscall () (gdb) where #0 0x00187416 in __kernel_vsyscall () #1 0x00a03460 in raise () from /lib/libc.so.6 #2 0x00a04e28 in abort () from /lib/libc.so.6 #3 0x0808e09e in free (cp=0x8bfb008) at tc.alloc.c:313 #4 0x0808e408 in realloc (cp=0x8bfb008, nbytes=2064) at tc.alloc.c:431 #5 0x0806e3a0 in morecommand (s=) at sh.proc.c:686 #6 0x0806e408 in pads (cp=0x9060808) at sh.proc.c:874 #7 0x0806e55d in padd (t=0x8f5fa48) at sh.proc.c:812 #8 0x0806ec54 in unparse (t=0x8f5fa48) at sh.proc.c:702 #9 0x080704e8 in execute (t=0x8f5fa48, wanttty=16099, pipein=0x0, pipeout=0x0, do_glob=0) at sh.sem.c:337 #10 0x08092093 in dolist (v=0x8eda908, c=0x8f5f908) at tc.func.c:307 #11 0x08062e6f in func (t=0x8f5f908, bp=0x809f6e0) at sh.func.c:146 #12 0x0806fe6e in execute (t=0x8f5f908, wanttty=16099, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:632 #13 0x080702b4 in execute (t=0x8f5df08, wanttty=16099, pipein=0x0, pipeout=0x0, do_glob=1) at sh.sem.c:720 #14 0x08050422 in process (catch=1) at sh.c:2003 #15 0x080529d1 in main (argc=0, argv=0xbfa60cc4) at sh.c:1288 regards, Peter From christos at zoulas.com Thu Jun 25 17:12:10 2009 From: christos at zoulas.com (Christos Zoulas) Date: Thu, 25 Jun 2009 10:12:10 -0400 Subject: tcsh-6.16.01 is now available In-Reply-To: <674da64241768bb63814903e97b455aa.squirrel@www.q-leap.de> from "Peter Kruse" (Jun 25, 3:31pm) Message-ID: <20090625141211.09D895654E@rebar.astron.com> On Jun 25, 3:31pm, pk at q-leap.com ("Peter Kruse") wrote: -- Subject: Re: tcsh-6.16.01 is now available Thanks everyone for the stack traces... The problem has been found: christos Index: sh.proc.c =================================================================== RCS file: /p/tcsh/cvsroot/tcsh/sh.proc.c,v retrieving revision 3.107 diff -u -u -r3.107 sh.proc.c --- sh.proc.c 19 Jun 2009 16:35:33 -0000 3.107 +++ sh.proc.c 25 Jun 2009 14:10:27 -0000 @@ -683,7 +685,7 @@ ptrdiff_t d; cmdmax += s; - ncmdstr = xrealloc(cmdstr, cmdmax); + ncmdstr = xrealloc(cmdstr, cmdmax * sizeof(*cmdstr)); d = ncmdstr - cmdstr; cmdstr = ncmdstr; cmdp += d; From h.m.brand at xs4all.nl Thu Jun 25 17:27:33 2009 From: h.m.brand at xs4all.nl (H.Merijn Brand) Date: Thu, 25 Jun 2009 16:27:33 +0200 Subject: tcsh-6.16.01 is now available In-Reply-To: <20090625141211.09D895654E@rebar.astron.com> References: <674da64241768bb63814903e97b455aa.squirrel@www.q-leap.de> <20090625141211.09D895654E@rebar.astron.com> Message-ID: <20090625162733.7333281c@pc09.procura.nl> On Thu, 25 Jun 2009 10:12:10 -0400, christos at zoulas.com (Christos Zoulas) wrote: > On Jun 25, 3:31pm, pk at q-leap.com ("Peter Kruse") wrote: > -- Subject: Re: tcsh-6.16.01 is now available > > > Thanks everyone for the stack traces... The problem has been found: > > christos > > Index: sh.proc.c > =================================================================== > RCS file: /p/tcsh/cvsroot/tcsh/sh.proc.c,v > retrieving revision 3.107 > diff -u -u -r3.107 sh.proc.c > --- sh.proc.c 19 Jun 2009 16:35:33 -0000 3.107 > +++ sh.proc.c 25 Jun 2009 14:10:27 -0000 > @@ -683,7 +685,7 @@ > ptrdiff_t d; > > cmdmax += s; > - ncmdstr = xrealloc(cmdstr, cmdmax); > + ncmdstr = xrealloc(cmdstr, cmdmax * sizeof(*cmdstr)); > d = ncmdstr - cmdstr; > cmdstr = ncmdstr; > cmdp += d; Yes, problem solved! Thanks for the quick fix. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/