GNU bug report logs - #37671
27.0.50; Segmentation fault with --fg-daemon on Linux

Previous Next

Package: emacs;

Reported by: Frank Terbeck <ft <at> bewatermyfriend.org>

Date: Wed, 9 Oct 2019 02:41:01 UTC

Severity: normal

Tags: moreinfo

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: ft <at> bewatermyfriend.org, 37671 <at> debbugs.gnu.org
Subject: bug#37671: 27.0.50; Segmentation fault with --fg-daemon on Linux
Date: Fri, 11 Oct 2019 10:02:20 +0300
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Thu, 10 Oct 2019 13:56:46 -0700
> Cc: 37671 <at> debbugs.gnu.org
> 
> As a shot in the dark, does the attached patch fix things for you, or 
> affect the symptoms? The idea is to prevent a reset hlinfo from looking 
> like it's nonempty. (A fancier possibility would be to add one to 
> end_row and end_col everywhere.)
> 
> diff --git a/src/dispextern.h b/src/dispextern.h
> index 7a15e2745b..19f2d3ba6c 100644
> --- a/src/dispextern.h
> +++ b/src/dispextern.h
> @@ -2840,7 +2840,7 @@ #define PRODUCE_GLYPHS(IT)                              \
>  reset_mouse_highlight (Mouse_HLInfo *hlinfo)
>  {
>  
> -    hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
> +    hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = 0;

This cannot be right, since zero is a valid column number.

>        /* If mouse highlighting is on, we may need to draw adjacent
>  	 glyphs using mouse-face highlighting.  */
>        if (area == TEXT_AREA && row->mouse_face_p
> -	  && hlinfo->mouse_face_beg_row >= 0
> -	  && hlinfo->mouse_face_end_row >= 0)
> +	  && hlinfo->mouse_face_beg_row <= hlinfo->mouse_face_end_row)

And this cannot be right because of bidirectional editing support,
whereby beg_row CAN be greater than end_row.

The test whether mouse highlight info is valid should involve the
mouse_face_window and mouse_face_mouse_frame members., and if these
are valid, then the row and column numbers should be valid as well.
If the row or the column are invalid, e somehow failed to update them
when we computed the info and set the frame and the window members.




This bug report was last modified 5 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.