screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: screen 4.7.0 crashes on startup with rxvt defined by termcap (FreeBS


From: Amadeusz Sławiński
Subject: Re: screen 4.7.0 crashes on startup with rxvt defined by termcap (FreeBSD)
Date: Tue, 29 Oct 2019 19:34:22 +0100

On Mon, 28 Oct 2019 13:28:15 +0000
Marcin Cieslak <address@hidden> wrote:

> Hello,
> 
> I have noticed that screen 4.7.0 crashes on my 11.x and 12.x FreeBSD
> systems whenever TERM was set to "rxvt" or "rxvt-unicode-256color".
> 
> Preliminary analysis in the bug report:
> 
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241538
> 
> > Here's the rub: with TERM=xterm (or rxvt, for that matter), Km
> > ("key_mouse", "Mouse event has occured") is not set (and therefore
> > NULL), but InitTermcap() (termcap.c:230) happily tries to strdup()
> > that, which gets us that segfault.  
> 
> Looks like the culprit was:
> 
> commit fad4c29fd95d30639a67142066f623396fca8536
> Author: Amadeusz Sławiński <address@hidden>
> Date:   Sat Sep 7 17:58:50 2019 +0200
> 
>      Fix broken mouse after ncurses 6.1
> 
>      ncurses 6.1 changed kmous capability from "\e[M" to "\e[<". It seems to
>      be done to signal that terminal supports sgr mouse mode. screen assumed
>      that if kmous is set to "\e[M" it is on xterm compatible terminal
>      anyway, so just dynamically detect which one is used and override
>      relevant kmapdef.
> 
>      InitKeytab() is moved, so kmapdef[] can be overriden before
>      initialization, as InitTermcap() needs to run first, as far as I can
>      tell this should have no consequences.
> 
>      Signed-off-by: Amadeusz Sławiński <address@hidden>
> 
> A quick fix we have is to check for D_CKIM before strdup()ing it:
> 
> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=208653&action=diff
> 
> saper

Hi,

yes seems like I made a mistake. The patch looks ok, any chance you can
send it to screen-devel (best would be for both master and screen-v4
branches)?

Cheers,
Amadeusz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]