Mail Archives: cygwin/2019/08/30/14:21:01
X-Recipient: | archive-cygwin AT delorie DOT com
|
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:date:from:to:subject:message-id:in-reply-to
|
| :references:mime-version:content-type:content-transfer-encoding;
|
| q=dns; s=default; b=rcoYHpslp9B0vWWSx0Ts65SHsfn3TVq1jpKyoWq2rYc
|
| cdpWLefaUeOF/Id0Efluh87LZiA+mBwJj/k5C61HNNLAHbzEey0TVjZKmjYUHiea
|
| ijcSo6aljKMOR39hPOYmTQQ+9NUvVD+fPWyH3B26XYgxfDkweuQxGXNP9V2Q1j0U
|
| =
|
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:date:from:to:subject:message-id:in-reply-to
|
| :references:mime-version:content-type:content-transfer-encoding;
|
| s=default; bh=lX2CboXxO1XCHtlWJFxcHYy6aKI=; b=uW1SuNkd01byl6RGl
|
| U37Hn9lP+21hCAATrsDmrY96OmiCW9x4clFOBQP6A2wt4EeowfpU2Iaq9bQj0Snx
|
| iP8u1llKNbiA5L3JnsILa1SRKlx8PdmilRHl5Vxbg/BCoz++kcZjdJFJgSa5HZ2Y
|
| v99o3dci5GY6LHLo8Jt92o1v/c=
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
Authentication-Results: | sourceware.org; auth=none
|
X-Spam-SWARE-Status: | No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=revised, HDKIM-Filter:v2.10.3, culprit, HX-Spam-Relays-External:Sendmail
|
X-HELO: | conssluserg-04.nifty.com
|
DKIM-Filter: | OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x7UIK2VX021466
|
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1567189202; bh=5JOuEFqMcZWRHDIoZOn02ol+93vzokMflDs6FMw4xuU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=buoSyswXU4TLz4gcEoAU4p0Ryl/djatT5i8Va6wfj1/chgu+EzoCzWjeuH4PcdI+r yB02Qvdi5Rh+eplofeIBamO2w6ZxAorIINcxc7yoi6xhMatcNBzjIfg0+1t6fAAwqu AbVOiP1d+4FCl+vYPyc0WG03Wdw7p9ov5uupm6/G4TO9C8mngGBWqRPzIp6O4lSt8q xyyEk+r/uvOwzMB89blWJPle7fBSXJMHO+I0CVAyYay13rZy+SyH9q7QOkowMWxykl pvebv0TNBk2+XoiEyqE0acB4cUjSWKX8OOEIHmG3XH1fm/e+RFNSrLiem9D0VsnVYO 2HkTiVhRwuPZg==
|
Date: | Sat, 31 Aug 2019 03:20:03 +0900
|
From: | Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
|
To: | cygwin AT cygwin DOT com
|
Subject: | Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.3
|
Message-Id: | <20190831032003.d19fb7060c632bb51777c0de@nifty.ne.jp>
|
In-Reply-To: | <20190830075523.GB27273@calimero.vinschen.de>
|
References: | <announce DOT 20190829122237 DOT GZ11632 AT calimero DOT vinschen DOT de> <CALK-3mLPXAcjZdftE_L-YwneyM79GBEt8c1nyVTisjKp0abCUg AT mail DOT gmail DOT com> <20190830075523 DOT GB27273 AT calimero DOT vinschen DOT de>
|
Mime-Version: | 1.0
|
X-IsSubscribed: | yes
|
Hi Biswapriyo and Corinna,
Thank you very much for testing.
On Fri, 30 Aug 2019 09:55:23 +0200
Corinna Vinschen wrote:
> On Aug 29 22:15, Biswapriyo Nath wrote:
> > On Thursday, August 29, 2019, Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
> > 1a. In fhandler_pty_mater::ioctl function, shouldn't the function pointer
> > be checked before use? Also what the FIXME says, isn't clear. Any hint?
>
> Yeah, right. What happens on pre-W10 1809 systems? They probably
> crash on TIOCSWINSZ. See below.
This code is protected by
if (getPseudoConsole () && ...
that is, pseudo console handle is set only if CreatePseudoConsole()
successes. In pre-W10 1809, since pseudo console handle is not set,
this code is not reached. However, it is better to check before
call as you suggest.
What is meant in FIXME comment:
ResizePseudoConsole() needs handle to pseudo console. This handle is
valid only in the process which created it. If ioctl(TIOCSWINSZ, ...)
is called from other process, it fails. I had tried DuplicateHandle(),
but it did not work. Therefore, ResizePseudoConsole() is called
only if ioctl() is called from PTY master process. Similarly,
ClosePseudoConsole() can work only in the master process.
> > 1b. GetModuleHandle and GetProcessHeap is called several times. Wouldn't be
> > it easier to get all the pseudo console function pointers in one
> > constructor?
>
> In terms of GetModuleHandle/GetProcAddress the right thing to do is to
> use the autoload feature, i.e., add the functions to autoload.cc like
> this:
>
> LoadDLLfuncEx (ClosePseudoConsole, 4, kernel32, 1)
> LoadDLLfuncEx (CreatePseudoConsole, 20, kernel32, 1)
> LoadDLLfuncEx (ResizePseudoConsole, 8, kernel32, 1)
>
> If the function call returns FALSE with GetLastError() ==
> ERROR_PROC_NOT_FOUND, then the function is not available.
>
> Takashi, I didn't actually notice the usage of the Windows heap here.
> The usual method is to use a tls_pbuf buffer, and rather than
> using MultiByteToWideChar/WideCharToMultiByte, use sys_mbstowcs/
> sys_wcstombs.
>
> Also, can you please change the camelback names in class tty_min to
> underscored writing, e.g., term_codepage rather than TermCodePage?
OK. I will revised the code followed to your advice.
First, I would like to fix some bugs and will post a patch.
Second, I will revise the coding style.
May I post them as indivisual patches? I also suppose the patch should
be against the v9 patch, right?
> > 3. I can't reproduce this issue with exact steps. But when I zoom in/out +
> > resize mintty window + execute cmd.exe in mintty in some random order it
> > crashed. Here is the error:
> >
> > [main] D:\Cygwin64\bin\bash 1129
> > fhandler_pty_slave::push_to_pcon_screenbuffer: pty0: pcon_attach
> > mismatch?????? (0x18035DBD0)
>
> Takashi?
This most likely is caused by a bug. Now, I am looking into this problem.
I have found the culprit, maybe.
--
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -