www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/05/08/07:10:07

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D09573858C54
Authentication-Results: sourceware.org;
dmarc=fail (p=none dis=none) header.from=nifty.ne.jp
Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 248B8rq2002745
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;
s=dec2015msa; t=1652008133;
bh=I/o3bdbH9NkzK6+wBsxfI0Ns4QxuWDSOpkmvWm2g3I8=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=dLOqk9U87uiJWkVJB7dW6gFgt3ikEhpk90Ohut7IaPRk+0nqLqDPU53n0OYWkbHtm
ajnjiOnRfaZg2LWq/C7OLtnbN+rjrQi/aSHx+Im1IB5r5sIQh2oPAqKzVf5RbhVCl1
yUmcQqepS5NXW+tcKQr9RxqnhrsqU8ytJ+mNbXHRe+fZz8AjLlLeUkV1XakW1+5cDh
YOIYIU6r8DnqDaqYvfXLCTthDFUw0cV/HzhiDYS3quDkCUIinDStsGVvDz6AjUt3gH
Y8bZWKgm/oNEEoom7pUIeY5hGXpUmBsbG0vBml4FzjPHrpfJDKhRdVia85am3FBQMM
57Krgrl7fbOsQ==
X-Nifty-SrcIP: [119.150.44.95]
Date: Sun, 8 May 2022 20:08:54 +0900
From: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
To: cygwin AT cygwin DOT com
Subject: Re: mintty crashes on Windows 7
Message-Id: <20220508200854.e0f9eb2faa61c87d3fa65ae2@nifty.ne.jp>
In-Reply-To: <20220507092051.c02f3bae30332d237ad7d0ed@nifty.ne.jp>
References: <CAGHpTB+t+gCySabZZQvJstZSLresmoOTUUL8of9cwCdvmGySdg AT mail DOT gmail DOT com>
<CAGHpTBJyOgYAzEvs3NLb8AzkiujbCKjaf+w-QSJAou47g-J-Cg AT mail DOT gmail DOT com>
<CAGHpTB+tZX+z0ZkCNG-42bp4Pw+YKUXkccnnNqwN_tHRekk=UA AT mail DOT gmail DOT com>
<20220504201610 DOT 125888f234ffe063fa6773c0 AT nifty DOT ne DOT jp>
<CAGHpTBKphe_jSRS+9ihygODYGYYyzPfLPkt9H4rTDm9u7pMexw AT mail DOT gmail DOT com>
<20220505102045 DOT fd6bfd46732e2eab0451e28c AT nifty DOT ne DOT jp>
<20220505102724 DOT 11b5675450f2b4f723a8b70e AT nifty DOT ne DOT jp>
<20220505105954 DOT e910df2e6998d130a9373299 AT nifty DOT ne DOT jp>
<20220505123307 DOT e745d7c88877316b9a38d0c9 AT nifty DOT ne DOT jp>
<20220505134120 DOT 242af45a631131d7e4217f5e AT nifty DOT ne DOT jp>
<20220505154440 DOT d9002cc94e7d52b3c6c1f339 AT nifty DOT ne DOT jp>
<20220506074851 DOT 3ce94db7a3ab2bedf7e07f93 AT nifty DOT ne DOT jp>
<CAGHpTBJRbqTf_2rmXD8413940+At+KS6_2C_702xR0t-L7aVSg AT mail DOT gmail DOT com>
<nycvar DOT QRO DOT 7 DOT 76 DOT 6 DOT 2205062109380 DOT 346 AT tvgsbejvaqbjf DOT bet>
<20220507051323 DOT a6f1116ded86123e8c14993d AT nifty DOT ne DOT jp>
<20220507092051 DOT c02f3bae30332d237ad7d0ed AT nifty DOT ne DOT jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Cc: Johannes Schindelin <Johannes DOT Schindelin AT gmx DOT de>,
Orgad Shaneh <orgads AT gmail DOT com>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Sat, 7 May 2022 09:20:51 +0900
Takashi Yano wrote:
> On Sat, 7 May 2022 05:13:23 +0900
> Takashi Yano wrote:
> > On Fri, 6 May 2022 21:16:10 +0200 (CEST)
> > Johannes Schindelin wrote:
> > > Takashi, for the record, I find it hard to believe that the bug is
> > > libreadline's because Orgad's scenario works if he reverts that patch in
> > > the _MSYS2 runtime_, _and_ it is rather dubious that libreadline would
> > > potentially do anything that makes a call to `GetProcessWindowStation()`
> > > not fail but _crash_.
> > 
> > I found the following test case also crashes with that commit.
> > 
> > 1) Compile rl_stc.c with gcc rl_stc.c -lreadline -o rl_stc.c
> > 2) mintty --hold always ./rl_stc
> > 
> > /* rl_stc.c */
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <readline/readline.h>
> > 
> > int main(int argc, char *argv[])
> > {
> >     char *str;
> >     if (argc > 1) {
> >         str = readline(">> ");
> >         printf("%s\n", str);
> >         free(str);
> >     }
> >     return 0;
> > }
> > 
> > In this test case, no args is specified, so readline() is
> > not called. However, this crashes indeed. This means just
> > loading msys-readline8.dll causes the crash.
> 
> 1') gcc --static rl_stc.c -lreadline -lncurses -o rl_stc.c
> 2) mintty --hold always ./rl_stc
> 
> also causes crash. In this case, no code from libreadline is
> executed, I think. Why this triggers GetProcessWindowStation()
> crash?

I have pushed two patches to cygwin-3_3-branch. I am not sure
why, but the issue (bash with readline crash) seems to disappear.

Could you please try?

-- 
Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019