[Tcsh] How to debug bug 74

Dr. Werner Fink werner at suse.de
Wed Apr 10 06:03:03 UTC 2019


On Tue, Apr 09, 2019 at 05:13:18PM -0700, Christos Zoulas wrote:
> Hi, is there a test that fails right now? I don't see it. Or do you have a reproducer
> for the bad cleanup?

Yep ... the test created by tcsh-6.20.00/tests/aliases.at, does fail
with changed output lines:

expected is

  >> echo foo
  foo
  >> echo foo | cat
  foo

but withteh change it is

  foo
  >> echo foo
  foo
  >> echo foo | cat

meanwhile I've an other fix/workaround in the attachment to avoid
that the parse tree for the `while´ builtin gets lost. The idea
is that the postcmd alias will not be used for the expression done
the while builtin but.  Beside this in the testsuite there is a
small problem with sed syntax in tcsh-6.20.00.dif, all occurence
of [:blank:] should become [[:blank:]] as otherwise the (GNU) sed
will fail as first is not a POSIX.2 regex character class "[:"
and ":]" within brackets ;)

> Thanks,
> 
> christos

Werner

> 
> > On Apr 8, 2019, at 5:39 AM, Dr. Werner Fink <werner at suse.de> wrote:
> > 
> > On Mon, Apr 08, 2019 at 02:04:37PM +0200, Dr. Werner Fink wrote:
> > 
> >> --- tcsh-6.20.00/sh.c	2017-07-19 12:29:15.512471750 +0200
> >> +++ tcsh-6.20.00/sh.c	2019-04-08 13:35:32.462771640 +0200
> >> @@ -2188,14 +2188,15 @@ process(int catch)
> >> 	    stderror(ERR_OLD);
> >> 	}
> >> 
> >> -	postcmd();
> >> 	/*
> >> 	 * Execute the parse tree From: Michael Schroeder
> >> 	 * <mlschroe at immd4.informatik.uni-erlangen.de> was execute(t, tpgrp);
> >> 	 */
> >> 	execute(t, (tpgrp > 0 ? tpgrp : -1), NULL, NULL, TRUE);
> >> 	freesyn(t);
> >> +	setcopy(STR_, InputBuf, VAR_READWRITE | VAR_NOGLOB);
> >> 
> >> +	postcmd();	/* The potential aliasrun() might destroy the parse tree */
> >> 	/*
> >> 	 * Made it!
> >> 	 */
> >> @@ -2204,7 +2205,6 @@ process(int catch)
> >> 	    (void) check_window_size(0);	/* for window systems */
> >> 	}
> >> #endif /* SIG_WINDOW */
> >> -	setcopy(STR_, InputBuf, VAR_READWRITE | VAR_NOGLOB);
> >>     cmd_done:
> >> 	if (cleanup_reset())
> >> 	    cleanup_until(&paraml);
> > 

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tcsh-6.20.00-postcmd.patch
Type: text/x-patch
Size: 1421 bytes
Desc: tcsh-6.20.00-postcmd.patch
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20190410/8d9550f4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 894 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20190410/8d9550f4/attachment.asc>


More information about the Tcsh mailing list