Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-25 Thread Brian Inglis
On 2020-02-24 20:53, Takashi Yano wrote: > On Tue, 25 Feb 2020 12:08:16 +0900 > Takashi Yano wrote: >> On Mon, 24 Feb 2020 19:33:18 +0100 >> Corinna Vinschen wrote: >>> Is there some kind of workaround for that problem? Otherwise defaulting >>> to a (broken) xterm mode instead of a (working) cygwi

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-25 Thread Takashi Yano
Hi Corinna, On Tue, 25 Feb 2020 10:16:56 +0100 Corinna Vinschen wrote: > > > Oh, wait. I was setting foreground and background color in > > > "terminal" tab in property. If I set them in "colors" tab, > > > cmd.exe behaves differently. In this setting, your problem > > > does not seems to occur. >

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-25 Thread Corinna Vinschen
On Feb 25 12:53, Takashi Yano wrote: > On Tue, 25 Feb 2020 12:08:16 +0900 > Takashi Yano wrote: > > On Mon, 24 Feb 2020 19:33:18 +0100 > > Corinna Vinschen wrote: > > > Is there some kind of workaround for that problem? Otherwise defaulting > > > to a (broken) xterm mode instead of a (working) cyg

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
On Tue, 25 Feb 2020 12:08:16 +0900 Takashi Yano wrote: > On Mon, 24 Feb 2020 19:33:18 +0100 > Corinna Vinschen wrote: > > Is there some kind of workaround for that problem? Otherwise defaulting > > to a (broken) xterm mode instead of a (working) cygwin mode is a bit > > questionable, isn't it? >

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
Hi Corinna, On Mon, 24 Feb 2020 19:33:18 +0100 Corinna Vinschen wrote: > Is there some kind of workaround for that problem? Otherwise defaulting > to a (broken) xterm mode instead of a (working) cygwin mode is a bit > questionable, isn't it? In my environment, legacy cygwin mode is not 'working'

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Brian Inglis
On 2020-02-24 11:33, Corinna Vinschen wrote: > On Feb 25 01:10, Takashi Yano wrote: >> On Mon, 24 Feb 2020 11:08:35 +0100 >> Corinna Vinschen wrote: >> [...] >>> Btw., are you testing the console with black background? I'm asking >>> because I'm using the console with grey background and black cha

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Corinna Vinschen
On Feb 25 01:10, Takashi Yano wrote: > On Mon, 24 Feb 2020 11:08:35 +0100 > Corinna Vinschen wrote: > [...] > > Btw., are you testing the console with black background? I'm asking > > because I'm using the console with grey background and black characters, > > and I'm always seeing artifacts when

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
On Mon, 24 Feb 2020 11:08:35 +0100 Corinna Vinschen wrote: > I debugged this situation as well and what strikes me as weird is > that in fhandler_console::close, there are two calls to > request_xterm_mode_output(false). The first one is only called if > shared_console_info is != NULL, the other o

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Corinna Vinschen
On Feb 22 22:35, Takashi Yano wrote: > On Sat, 22 Feb 2020 17:01:23 +0900 > Takashi Yano wrote: > > Hi Corinna, > > > > On Fri, 21 Feb 2020 20:43:33 +0100 > > Corinna Vinschen wrote: > > > On Feb 22 04:10, Takashi Yano wrote: > > > > - Accessing shared_console_info accidentaly causes segmentation

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-22 Thread Takashi Yano
On Sat, 22 Feb 2020 17:01:23 +0900 Takashi Yano wrote: > Hi Corinna, > > On Fri, 21 Feb 2020 20:43:33 +0100 > Corinna Vinschen wrote: > > On Feb 22 04:10, Takashi Yano wrote: > > > - Accessing shared_console_info accidentaly causes segmentation > > > fault when it is a NULL pointer. The cause of

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-22 Thread Takashi Yano
Hi Corinna, On Fri, 21 Feb 2020 20:43:33 +0100 Corinna Vinschen wrote: > On Feb 22 04:10, Takashi Yano wrote: > > - Accessing shared_console_info accidentaly causes segmentation > > fault when it is a NULL pointer. The cause of the problem reported > > in https://cygwin.com/ml/cygwin/2020-02/m

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-21 Thread Corinna Vinschen
Hi Takashi, On Feb 22 04:10, Takashi Yano wrote: > - Accessing shared_console_info accidentaly causes segmentation > fault when it is a NULL pointer. The cause of the problem reported > in https://cygwin.com/ml/cygwin/2020-02/msg00197.html is this NULL > pointer access in request_xterm_mode_

[PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-21 Thread Takashi Yano
- Accessing shared_console_info accidentaly causes segmentation fault when it is a NULL pointer. The cause of the problem reported in https://cygwin.com/ml/cygwin/2020-02/msg00197.html is this NULL pointer access in request_xterm_mode_output(). This patch fixes the issue. --- winsup/cygwin