all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Gustafsson <gson@gson.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22790@debbugs.gnu.org
Subject: bug#22790: 24.5; Infinite loop involving malloc called from signal handler
Date: Sat, 5 Mar 2016 12:17:30 +0200	[thread overview]
Message-ID: <22234.45626.25743.637407@guava.gson.org> (raw)
In-Reply-To: Re: <83ziuexogp.fsf@gnu.org>

Eli Zaretskii wrote:
> > > I don't think the loop can reasonably be inside libpthread,
> > 
> > Why not?
> 
> Because it's much more likely that Emacs has bugs that lead to
> infloops than that libpthread has such bugs.
> 
> > We are talking undefined behavior here, after all.
> 
> If libpthread was so prone to undefined behavior, it would have been
> either fixed long time ago or thrown away in favor of a more robust
> implementation.
> 
> I'm not saying such a bug in libpthread is impossible, just that it's
> much less likely than a bug in Emacs.

I never said there was a bug in libpthread.  The bug is in emacs,
which is incorrectly calling printf() from a signal handler.  Looping
is correct behavior on libpthread's part when you do that, as is any
other behavior - that's what "undefined behavior" means.

> I was under the impression that the loop happens regardless; apologies
> if I misunderstood.  But if you think it is caused by the emergency
> exit procedure, how about commenting out those printf's and running
> with the modified version for a while?  If the loops don't happen,
> then it will be another evidence in favor of your hypothesis about the
> reasons for this.
>
> In any case, if those printf's are the culprit, they are no longer
> there in the current sources of what will soon become Emacs 25.1.
> They were replaced with direct calls to 'write'.  So if we are sure
> there's no other problem that causes these loops, we can close this
> bug.

OK, to me this means that he bug has already been fixed in emacs 25.
I might as well back-port that fix to emacs 24 then, instead of just
commenting out the calls, and this bug report can be closed if no
further emacs 24 releases are planned.  If I'm still experiencing
problems after back-porting the fix or upgrading to emacs 25, I will
file separate bug reports about those.
-- 
Andreas Gustafsson, gson@gson.org





  reply	other threads:[~2016-03-05 10:17 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 [this message]
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

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=22234.45626.25743.637407@guava.gson.org \
    --to=gson@gson.org \
    --cc=22790@debbugs.gnu.org \
    --cc=eliz@gnu.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 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.