From: Philipp Stephani <p.stephani2@gmail.com>
To: Daniel Colascione <dancol@dancol.org>,
Andreas Gustafsson <gson@gson.org>, Eli Zaretskii <eliz@gnu.org>
Cc: 22790@debbugs.gnu.org
Subject: bug#22790: 24.5; Infinite loop involving malloc called from signal handler
Date: Sun, 13 Mar 2016 20:41:52 +0000 [thread overview]
Message-ID: <CAArVCkT=D4_FBpZco92uk8C7KWLU47V0VU+_XLPKEDnrwOHFzw@mail.gmail.com> (raw)
In-Reply-To: <56E5312B.2050008@dancol.org>
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
Daniel Colascione <dancol@dancol.org> schrieb am So., 13. März 2016 um
10:22 Uhr:
> On 03/04/2016 06:23 AM, Andreas Gustafsson wrote:
> > Eli Zaretskii wrote:
> >> Is this a GUI session or a text-mode terminal (a.k.a. "TTY") session?
> >
> > This is a TTY session.
> >
> >> In any case, this code is run as part of the so-called "emergency
> >> escape", when you type C-g more than once while Emacs is busy doing
> >> something that cannot be interrupted. In that situation, we are way
> >> past the point where invoking undefined behavior is of any concern,
> >> because the only thing we can do then is auto-save and commit
> >> suicide.
> >
> > Not necessarily - there is also the option of continuing what emacs
> > was doing, which is what I would have done, by answering both the
> > "Auto-save?" and "Abort (and dump core)?" prompts with "no", if those
> > prompts had actually appeared. But they didn't, because emacs entered
> > an infinite loop trying to print them.
> >
> >> You need to use "finish", not "step" or "stepi".
> >
> > I will try that the next time the lockup happens, but I'm quite sure
> > it won't do anything useful.
> >
> >> I don't think the loop can reasonably be inside libpthread,
> >
> > Why not? We are talking undefined behavior here, after all. If you
> > find looping in libpthread surprising, just wait until the nasal
> > demons appear :) It could be something as simple as trying to acquire
> > a spinlock that was already held when the signal occurred.
>
> The Emacs maintainership has decided that undefined behavior in signal
> handlers is perfectly okay. I've patched this dangerous code out of my
> Emacs, and I suggest you do too.
Could you maybe share the patch here? Thanks.
[-- Attachment #2: Type: text/html, Size: 2336 bytes --]
prev parent reply other threads:[~2016-03-13 20:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 13:08 bug#22790: 24.5; Infinite loop involving malloc called from signal handler Andreas Gustafsson
2016-02-24 17:51 ` Eli Zaretskii
2016-02-24 18:17 ` Andreas Gustafsson
2016-02-29 14:44 ` Andreas Gustafsson
2016-03-04 9:42 ` Eli Zaretskii
2016-03-04 14:23 ` Andreas Gustafsson
2016-03-04 15:16 ` Eli Zaretskii
2016-03-05 10:17 ` Andreas Gustafsson
2016-03-05 11:26 ` Eli Zaretskii
2016-07-07 16:24 ` Andreas Gustafsson
2016-07-07 16:53 ` Eli Zaretskii
2016-12-07 21:06 ` Glenn Morris
2016-03-13 9:21 ` Daniel Colascione
2016-03-13 20:41 ` Philipp Stephani [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAArVCkT=D4_FBpZco92uk8C7KWLU47V0VU+_XLPKEDnrwOHFzw@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=22790@debbugs.gnu.org \
--cc=dancol@dancol.org \
--cc=eliz@gnu.org \
--cc=gson@gson.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).