Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-21 Thread Takashi Yano
On Sat, 22 Oct 2022 07:58:37 +0200 Johannes Schindelin wrote: > On October 22, 2022 7:34:20 AM GMT+02:00, Takashi Yano > wrote: > >- If the command executed is 'cmd.exe /c [...]', runpath in spawn.cc > > will be NULL. In this case, is_console_app(runpath) check causes > > access violation. This

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Takashi Yano
On Sat, 22 Oct 2022 07:55:53 +0200 Johannes Schindelin wrote: > It's not very nice to simply drop my work, and then not even link to your > "counter". I am sorry, however, your patch can be indirectly reached via link https://github.com/msys2/msys2-runtime/issues/108 in my counter patch. -- Tak

Re: [PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-21 Thread Johannes Schindelin
On October 22, 2022 7:34:20 AM GMT+02:00, Takashi Yano wrote: >- If the command executed is 'cmd.exe /c [...]', runpath in spawn.cc > will be NULL. In this case, is_console_app(runpath) check causes > access violation. This case also the command executed is obviously > console app., therefore,

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Johannes Schindelin
On October 22, 2022 7:37:09 AM GMT+02:00, Takashi Yano wrote: >On Sat, 22 Oct 2022 10:54:06 +0900 >Takashi Yano wrote: >> On Sat, 22 Oct 2022 10:36:39 +0900 >> Takashi Yano wrote: >> > On Fri, 21 Oct 2022 23:37:35 +0200 (CEST) >> > Johannes Schindelin wrote: >> > > In 2b4f986e49 (Cygwin: pty: Tre

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Takashi Yano
On Sat, 22 Oct 2022 10:54:06 +0900 Takashi Yano wrote: > On Sat, 22 Oct 2022 10:36:39 +0900 > Takashi Yano wrote: > > On Fri, 21 Oct 2022 23:37:35 +0200 (CEST) > > Johannes Schindelin wrote: > > > In 2b4f986e49 (Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin > > > console app., 2022-07-31), we

[PATCH] Cygwin: pty: Fix 'Bad address' error when running 'cmd.exe /c dir'

2022-10-21 Thread Takashi Yano
- If the command executed is 'cmd.exe /c [...]', runpath in spawn.cc will be NULL. In this case, is_console_app(runpath) check causes access violation. This case also the command executed is obviously console app., therefore, treat it as console app to fix this issue. Addresses: https://gi

[PATCH] strptime.cc(__strptime): add %q GNU quarter

2022-10-21 Thread Brian Inglis
--- winsup/cygwin/libc/strptime.cc | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/libc/strptime.cc b/winsup/cygwin/libc/strptime.cc index 3a9bdbb300d4..d1e635cd279f 100644 --- a/winsup/cygwin/libc/strptime.cc +++ b/winsup/cygwin/libc/strptime.cc @@ -570

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Takashi Yano
On Sat, 22 Oct 2022 10:36:39 +0900 Takashi Yano wrote: > On Fri, 21 Oct 2022 23:37:35 +0200 (CEST) > Johannes Schindelin wrote: > > In 2b4f986e49 (Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin > > console app., 2022-07-31), we introduced a bug fix that specifically > > looks for a suffix of th

Re: [PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Takashi Yano
On Fri, 21 Oct 2022 23:37:35 +0200 (CEST) Johannes Schindelin wrote: > In 2b4f986e49 (Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin > console app., 2022-07-31), we introduced a bug fix that specifically > looks for a suffix of the command's file name. > > However, that file name might be set

[PATCH] Fix `Bad address` when running `cmd /c [...]`

2022-10-21 Thread Johannes Schindelin
In 2b4f986e49 (Cygwin: pty: Treat *.bat and *.cmd as a non-cygwin console app., 2022-07-31), we introduced a bug fix that specifically looks for a suffix of the command's file name. However, that file name might be set to `NULL`, namely when `null_app_name == true`, which is the case when we detec