From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: "Gerd Möllmann" <gerd.moellmann@gmail.com>,
59794@debbugs.gnu.org, "Kai Ma" <justksqsf@gmail.com>,
"Eli Zaretskii" <eliz@gnu.org>
Subject: bug#59794: 29.0.60; NSport segfaults when a fullscreen frame is being closed)
Date: Mon, 05 Dec 2022 09:10:04 +0800 [thread overview]
Message-ID: <87sfhupser.fsf@yahoo.com> (raw)
In-Reply-To: <m15yer9swm.fsf@yahoo.es> ("Daniel Martín"'s message of "Sun, 04 Dec 2022 14:53:45 +0100")
Daniel Martín <mardani29@yahoo.es> writes:
> Kai Ma <justksqsf@gmail.com> writes:
>
>>
>> diff --git a/src/nsterm.m b/src/nsterm.m
>> index 507f2a9e7d..f99d7cde3c 100644
>> --- a/src/nsterm.m
>> +++ b/src/nsterm.m
>> @@ -6703,8 +6703,18 @@ - (BOOL)acceptsFirstResponder
>>
>> - (void)resetCursorRects
>> {
>> - NSRect visible = [self visibleRect];
>> - NSCursor *currentCursor = FRAME_POINTER_TYPE (emacsframe);
>> + NSRect visible;
>> + NSCursor *currentCursor;
>> +
>> + /* FIXME: [resetCursorRects:] can be called from the event loop
>> + after the frame is deleted. When this happens,
>> + emacsframe->output_data is NULL. This means there is an
>> + underlying leak of the EmacsView object! (bug#59794) */
>> + if (! emacsframe || ! FRAME_OUTPUT_DATA (emacsframe))
>
> Wouldn't it be more clear to check !FRAME_LIVE_P (emacsframe) instead?
> (I can't reproduce this bug, so I don't know if that would avoid the
> crash.) There is a similar check in - (void)windowWillExitFullScreen
> and - (void)windowDidExitFullScreen, for example.
Those other calls are a serious problem too. They obscure an underlying
memory leak, and if emacsframe is not set to NULL by the point they are
called, they could result in use-after-frees once GC deletes emacsframe
entirely.
next prev parent reply other threads:[~2022-12-05 1:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 12:01 bug#59794: 29.0.60; NSport segfaults when a fullscreen frame is being closed Kai Ma
2022-12-03 10:08 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-03 10:27 ` Eli Zaretskii
2022-12-03 11:44 ` Gerd Möllmann
2022-12-03 13:03 ` Kai Ma
2022-12-03 13:53 ` Gerd Möllmann
2022-12-03 20:51 ` Kai Ma
[not found] ` <handler.59794.B.167005568724588.ack@debbugs.gnu.org>
2022-12-03 10:48 ` bug#59794: Acknowledgement (29.0.60; NSport segfaults when a fullscreen frame is being closed) Kai Ma
2022-12-04 6:54 ` bug#59794: 29.0.60; " Eli Zaretskii
2022-12-04 9:10 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 10:24 ` Eli Zaretskii
2022-12-04 11:59 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 12:21 ` Eli Zaretskii
2022-12-04 12:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 12:45 ` Kai Ma
2022-12-04 12:53 ` Eli Zaretskii
2022-12-04 13:53 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-04 14:04 ` Kai Ma
2022-12-05 1:10 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-01-10 20:35 ` Steven E. Harris
2023-01-11 1:14 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-11 4:38 ` Gerd Möllmann
2023-01-17 21:37 ` Steven E. Harris
2023-01-18 5:06 ` Gerd Möllmann
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=87sfhupser.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=59794@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=gerd.moellmann@gmail.com \
--cc=justksqsf@gmail.com \
--cc=luangruo@yahoo.com \
--cc=mardani29@yahoo.es \
/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.