all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Hamrick <mikeh@muppetlabs.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: Alan Third <alan@idiocy.org>, Mike Hamrick <mikeh@muppetlabs.com>,
	38564@debbugs.gnu.org
Subject: bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault
Date: Fri, 20 Dec 2019 12:21:40 -0800	[thread overview]
Message-ID: <m1a77miw8b.fsf@eidolon.muppetlabs.com> (raw)
In-Reply-To: <m2eewz9q1n.fsf@gmail.com>


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





  reply	other threads:[~2019-12-20 20:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11  1:33 bug#38564: 27.0.50; macOS "emacs -nw" git-gutter-mode segfault Mike Hamrick
2019-12-11 10:12 ` Robert Pluim
2019-12-11 15:15   ` Mike Hamrick
2019-12-11 15:35     ` Robert Pluim
2019-12-11 19:37   ` Alan Third
2019-12-12  7:45     ` Robert Pluim
2019-12-19 19:20       ` Alan Third
2019-12-19 18:03 ` Mike Hamrick
2019-12-19 19:14   ` Alan Third
2019-12-20 11:47     ` Robert Pluim
2019-12-20 20:21       ` Mike Hamrick [this message]
2019-12-29 20:41         ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1a77miw8b.fsf@eidolon.muppetlabs.com \
    --to=mikeh@muppetlabs.com \
    --cc=38564@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.