mintty crashes on Windows 7
Takashi Yano
takashi.yano@nifty.ne.jp
Sat May 7 00:20:51 GMT 2022
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?
--
Takashi Yano <takashi.yano@nifty.ne.jp>
More information about the Cygwin
mailing list