From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by sourceware.org (Postfix) with ESMTPS id 4763F3858D28 for ; Sat, 7 May 2022 00:21:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4763F3858D28 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 Received: from Express5800-S70 (ak044095.dynamic.ppp.asahi-net.or.jp [119.150.44.95]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 2470KhMb006024; Sat, 7 May 2022 09:20:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 2470KhMb006024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1651882844; bh=tIKIoX4MAWJE72IzXPzcui811r/rqAM05+reWlff2j8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tmgRhCkBKO0R+koVfUUTo03Rv954UH35jqIsVn57bqMHdLUnYCPP6Aqw340Hdvg+W 1dmbgFlVYz/qlRN7HbSlPiVmpOQo7NOol7sYUJ2WECOz35BHt+/4CHzW7drySOjiIZ ZhOp02oRe6yN8z2wK6+gcha1Pw+gsam1PIEuhZY5lZok4RWG2V4OudnICzn+nHpDjE 8AoLWB9TqcUCftwNR6H3d3eIxvDg79bIXlRqcrrwJS08s9o6e4z5TEy+sMjlJEwDFc YD5w8PvN9yT1Ck9g0IcsMnBfKY4/I1tTwLRXV03dKloluc/a7qw4GGMSxpI/jkcXlM GnzDCtWORtUTg== X-Nifty-SrcIP: [119.150.44.95] Date: Sat, 7 May 2022 09:20:51 +0900 From: Takashi Yano To: cygwin@cygwin.com Cc: Johannes Schindelin , Orgad Shaneh Subject: Re: mintty crashes on Windows 7 Message-Id: <20220507092051.c02f3bae30332d237ad7d0ed@nifty.ne.jp> In-Reply-To: <20220507051323.a6f1116ded86123e8c14993d@nifty.ne.jp> References: <20220504011018.7c455cedb38571f786d72ae9@nifty.ne.jp> <20220504201610.125888f234ffe063fa6773c0@nifty.ne.jp> <20220505102045.fd6bfd46732e2eab0451e28c@nifty.ne.jp> <20220505102724.11b5675450f2b4f723a8b70e@nifty.ne.jp> <20220505105954.e910df2e6998d130a9373299@nifty.ne.jp> <20220505123307.e745d7c88877316b9a38d0c9@nifty.ne.jp> <20220505134120.242af45a631131d7e4217f5e@nifty.ne.jp> <20220505154440.d9002cc94e7d52b3c6c1f339@nifty.ne.jp> <20220506074851.3ce94db7a3ab2bedf7e07f93@nifty.ne.jp> <20220507051323.a6f1116ded86123e8c14993d@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2022 00:21:21 -0000 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 > #include > #include > > 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? -- Takashi Yano