mintty crashes on Windows 7

Takashi Yano takashi.yano@nifty.ne.jp
Fri May 6 20:13:23 GMT 2022


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.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin mailing list