From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Orgad Shaneh <orgads@gmail.com>
Subject: Re: mintty crashes on Windows 7
Date: Sun, 8 May 2022 20:08:54 +0900 [thread overview]
Message-ID: <20220508200854.e0f9eb2faa61c87d3fa65ae2@nifty.ne.jp> (raw)
In-Reply-To: <20220507092051.c02f3bae30332d237ad7d0ed@nifty.ne.jp>
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.yano@nifty.ne.jp>
next prev parent reply other threads:[~2022-05-08 11:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-03 11:47 Orgad Shaneh
2022-05-03 15:23 ` Takashi Yano
2022-05-03 15:52 ` Orgad Shaneh
2022-05-03 16:10 ` Takashi Yano
2022-05-04 9:33 ` Orgad Shaneh
2022-05-04 9:46 ` Orgad Shaneh
2022-05-04 11:16 ` Takashi Yano
2022-05-04 13:27 ` Orgad Shaneh
2022-05-05 1:20 ` Takashi Yano
2022-05-05 1:27 ` Takashi Yano
2022-05-05 1:59 ` Takashi Yano
2022-05-05 3:33 ` Takashi Yano
2022-05-05 4:41 ` Takashi Yano
2022-05-05 6:44 ` Takashi Yano
2022-05-05 22:48 ` Takashi Yano
2022-05-06 14:05 ` Orgad Shaneh
2022-05-06 17:22 ` Brian Inglis
2022-05-06 19:02 ` Takashi Yano
2022-05-06 19:16 ` Johannes Schindelin
2022-05-06 20:13 ` Takashi Yano
2022-05-07 0:20 ` Takashi Yano
2022-05-08 11:08 ` Takashi Yano [this message]
2022-05-08 11:22 ` Orgad Shaneh
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=20220508200854.e0f9eb2faa61c87d3fa65ae2@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=Johannes.Schindelin@gmx.de \
--cc=cygwin@cygwin.com \
--cc=orgads@gmail.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).