GNU bug report logs -
#38564
27.0.50; macOS "emacs -nw" git-gutter-mode segfault
Previous Next
Reported by: Mike Hamrick <mikeh <at> muppetlabs.com>
Date: Wed, 11 Dec 2019 02:17:02 UTC
Severity: normal
Tags: fixed
Merged with 38757
Found in version 27.0.50
Fixed in version 27.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Robert Pluim writes:
> I was, but I thought the previous version should work as well. Hmm, is
> FRAME_DISPLAY_INFO guaranteed to be initialized?
The stack trace I posted on Thursday the 19th, was built from d55f2f7,
which is a number of commits after your commit ea84a95 which updated
ns_color_index_to_rbga() to test for a non-null FRAME_DISPLAY_INFO
pointer.
I think the problem here is that FRAME_DISPLAY_INFO references
f->output_data which is a union.
#define FRAME_DISPLAY_INFO(f) ((f)->output_data.ns->display_info)
union output_data
{
struct tty_output *tty; /* From termchar.h. */
struct x_output *x; /* From xterm.h. */
struct w32_output *w32; /* From w32term.h. */
struct ns_output *ns; /* From nsterm.h. */
}
In the case of a tty frame, we're going to be dereferencing a struct
tty_output *, rather than a struct ns_ouput *, and when that happens
sometimes the "display_info" offset into the tty_output struct may
or my not luckily land on patch of NULL bytes.
Robert Pluim also wrote:
> Mike, could you try the following?
Yup, I'm running with that patch now. This should stop the function
extend_face_to_end_of_line() from ever calling ns_color_index_to_rgba()
when you're in a tty frame, which I think will fix this for good.
I've taken to running my emacs 27 server process in the debugger, so if I
get any more crashes I should have more stack traces for ya.
Thanks!
Mike
This bug report was last modified 5 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.