zsh-workers
 help / color / mirror / code / Atom feed
* Latest 4.3.0-dev infinite-loops in Y0*.ztst
@ 2005-10-04  2:50 Bart Schaefer
  2005-10-04  3:36 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2005-10-04  2:50 UTC (permalink / raw)
  To: zsh-workers

At first I thought the problem was with ptyread(), but in fact it appears
that the process running on the PTY is printing either an infinite, or at
least a very long, string of identical characters which are then read and
tested one by one with pattry() in ptyread() by the PTY master.

I've verified that this does NOT have anything to do with the complist.c
patch I posted a few minutes ago.  However, it DOES have something to do
with configuring with --disable-multibyte, because when I reconfigure
with --enable-multibyte all the tests run and pass.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest 4.3.0-dev infinite-loops in Y0*.ztst
  2005-10-04  2:50 Latest 4.3.0-dev infinite-loops in Y0*.ztst Bart Schaefer
@ 2005-10-04  3:36 ` Bart Schaefer
  2005-10-04  4:14   ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2005-10-04  3:36 UTC (permalink / raw)
  To: zsh-workers

On Oct 4,  2:50am, Bart Schaefer wrote:
}
} However, it DOES have something to do with configuring
} with --disable-multibyte, because when I reconfigure with
} --enable-multibyte all the tests run and pass.

I should add that, although the tests pass, completion listings don't
display properly for me with --enable-multibyte.  They seem to come
out all on one line, even though they are spaced as they would be if
they appeared on several lines.

I tried "setopt listrowsfirst" to see if that rearranged the entries
at all, but it does not, so it appears that the completion code has
simply lost all notion of how wide the terminal is.  If every individual
line of the listing is short enough to fit (e.g., because of breaking
up the list with groupings), everything looks fine.

Attempting to reproduce an example textually here would be useless,
because the upward cursor motions are confused as well, so the prompt
appears in the midst of the list, etc.  I'll take a screenshot if
someone thinks it would help.  However, it's probable that my crufty
old OS simply doesn't have full multibyte support, and what I really
need is for completion to work with --disable-multibyte.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest 4.3.0-dev infinite-loops in Y0*.ztst
  2005-10-04  3:36 ` Bart Schaefer
@ 2005-10-04  4:14   ` Bart Schaefer
  2005-10-04  9:53     ` DervishD
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2005-10-04  4:14 UTC (permalink / raw)
  To: zsh-workers

On Oct 4,  3:36am, Bart Schaefer wrote:
}
} old OS simply doesn't have full multibyte support, and what I really
} need is for completion to work with --disable-multibyte.

That was a lot less difficult to track down than I expected.

Index: Src/Zle/complist.c
675c675
<     while ((cc = *s)) {
---
>     while ((cc = *s++)) {


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest 4.3.0-dev infinite-loops in Y0*.ztst
  2005-10-04  4:14   ` Bart Schaefer
@ 2005-10-04  9:53     ` DervishD
  2005-10-04 10:12       ` Peter Stephenson
  0 siblings, 1 reply; 6+ messages in thread
From: DervishD @ 2005-10-04  9:53 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

    Hi Bart :)

 * Bart Schaefer <schaefer@brasslantern.com> dixit:
> On Oct 4,  3:36am, Bart Schaefer wrote:
> }
> } old OS simply doesn't have full multibyte support, and what I really
> } need is for completion to work with --disable-multibyte.
> 
> That was a lot less difficult to track down than I expected.
> 
> Index: Src/Zle/complist.c
> 675c675
> <     while ((cc = *s)) {
> ---
> >     while ((cc = *s++)) {

    When applying this patch to a 4.2.5 source, it looks like already
applied, so I applied it with "patch -R" and the crash now happens
immediately, as soon as menu completion is started.

    I know that this problem is only vaguely related with mine (just
in the infinite loop side) but just in case you needed feedback...

    I'm going to build a zsh with debugging support, so if you need
any information just tell me what should I run.

    This bug is annoying because is VERY weird to have a COLUMNS
value less than, let's say, 60, but is not as weird to have more than
100 characters pathnames (or even filenames).

    Thanks again, Bart :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest 4.3.0-dev infinite-loops in Y0*.ztst
  2005-10-04  9:53     ` DervishD
@ 2005-10-04 10:12       ` Peter Stephenson
  2005-10-04 10:52         ` DervishD
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Stephenson @ 2005-10-04 10:12 UTC (permalink / raw)
  To: zsh-workers

DervishD <zsh@dervishd.net> wrote:
> > Index: Src/Zle/complist.c
> > 675c675
> > <     while ((cc = *s)) {
> > ---
> > >     while ((cc = *s++)) {
> 
>     When applying this patch to a 4.2.5 source, it looks like already
> applied, so I applied it with "patch -R" and the crash now happens
> immediately, as soon as menu completion is started.

The problem wasn't present in 4.2.5: applying the patch in reverse you are
creating it.

It got introduced when I added a separate #ifdef branch for multibyte
handling and screwed up the existing code.  That's what happens when you
change your mind in the middle about what you're doing.

pws


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Latest 4.3.0-dev infinite-loops in Y0*.ztst
  2005-10-04 10:12       ` Peter Stephenson
@ 2005-10-04 10:52         ` DervishD
  0 siblings, 0 replies; 6+ messages in thread
From: DervishD @ 2005-10-04 10:52 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

    Hi Peter :)

 * Peter Stephenson <pws@csr.com> dixit:
> DervishD <zsh@dervishd.net> wrote:
> > > Index: Src/Zle/complist.c
> > > 675c675
> > > <     while ((cc = *s)) {
> > > ---
> > > >     while ((cc = *s++)) {
> > 
> >     When applying this patch to a 4.2.5 source, it looks like already
> > applied, so I applied it with "patch -R" and the crash now happens
> > immediately, as soon as menu completion is started.
> 
> The problem wasn't present in 4.2.5: applying the patch in reverse you are
> creating it.

    That's what I was testing ;)))
 
> It got introduced when I added a separate #ifdef branch for
> multibyte handling and screwed up the existing code.  That's what
> happens when you change your mind in the middle about what you're
> doing.

    Yes, I know what you mean. I've very creative adding bugs,
believe me...

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-04 10:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-04  2:50 Latest 4.3.0-dev infinite-loops in Y0*.ztst Bart Schaefer
2005-10-04  3:36 ` Bart Schaefer
2005-10-04  4:14   ` Bart Schaefer
2005-10-04  9:53     ` DervishD
2005-10-04 10:12       ` Peter Stephenson
2005-10-04 10:52         ` DervishD

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).