public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: screen on 64-bit mangles mintty/buffer
Date: Thu, 15 May 2014 14:10:00 -0000	[thread overview]
Message-ID: <20140515134905.GR2436@calimero.vinschen.de> (raw)
In-Reply-To: <5374B8EA.5080801@shaddybaddah.name>

[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]

On May 15 22:54, Shaddy Baddah wrote:
> Hi Corinna,
> 
> 
> On 2014-05-15 17:17+1000, Corinna Vinschen wrote:
> >
> >
> >Nice detective work, really.  The goldstar is well deservered :)
> >
> >On May 15 04:00, Shaddy Baddah wrote:
> >>I quickly worked out that the code has a bug for "%i". At some point
> >>the code was changed to push and pop the parameters being passed (0 and
> >>39 in my eg.). However, the "%i" select/case block was incrementing the
> >>arguments in a no longer used array for parameters:
> >>
> >>
> >>	    case 'i':
> >>		if (p_is_s[0] == 0)
> >>		    param[0]++;
> >>		if (p_is_s[1] == 0)
> >>		    param[1]++;
> >>		break;
> >
> >Unfortunately there's no newer upstream release and this bug is present
> >in the ncurses 5.9 version in Fedora 20 as well.  From what I gather from the
> >surrounding code, I *assume* something like this could fix it
> >
> >             case 'i':
> >                 y = npop();
> >                 x = npop();
> >                 if (p_is_s[0] == 0)
> >                     y++;
> >                 if (p_is_s[1] == 0)
> >                     x++;
> >                 npush(x);
> >                 npush(y);
> >                 break;
> >
> >I'm not sure the relation between x, y, and the p_is_s indices is
> >correct, though.
> 
> Yes, that's the code that I thought of as well, and same, I'd have to
> get my head around the exact order of p_is_s (unfortunate name), etc.
> 
> When you say the bug is present in ncurses 5.9, is there any application
> that is directly affected? I ask as screen being affected was sort of a
> fluke. It's configure script should have detected terminfo notation was
> available for use, and used the equivalent entry for "cs".

Well, according to Murphy, if there's a bug, it will be hit.

One of them is, for instance, tcsh, which still uses the termcap
functions deliberately for compatibility with old systems, even when
linked against [n]curses[w].  Fortunately tcsh doesn't try to use really
fancy terminal sequences...

There are very likely more projects out there doing that.  And on many
systems the only way to get the termcap functions is to use ncurses.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2014-05-15 13:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 15:57 Shaddy Baddah
2014-05-12 16:38 ` Corinna Vinschen
2014-05-12 16:51 ` Andrew Schulman
2014-05-14 18:16   ` Shaddy Baddah
2014-05-14 21:15     ` Andrew Schulman
2014-05-14 23:22       ` Christopher Faylor
2014-05-15  2:18         ` Andrew Schulman
2014-05-15 12:54       ` Shaddy Baddah
2014-05-15 17:44         ` Andrew Schulman
2014-05-15  7:32     ` Corinna Vinschen
2014-05-15 13:11       ` Shaddy Baddah
2014-05-15 14:10         ` Corinna Vinschen [this message]

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=20140515134905.GR2436@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).