all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Elias Martenson <elias.martenson@murex.com>
Cc: 25178@debbugs.gnu.org
Subject: bug#25178: 26.0.50; Crash when pressing C-g in TTY mode
Date: Wed, 14 Dec 2016 05:39:38 +0200	[thread overview]
Message-ID: <83y3zj9o1x.fsf@gnu.org> (raw)
In-Reply-To: <yxd8oa0fmckn.fsf@murex.com> (message from Elias Martenson on Wed, 14 Dec 2016 11:09:12 +0800)

> From: Elias Martenson <elias.martenson@murex.com>
> CC: <25178@debbugs.gnu.org>
> Date: Wed, 14 Dec 2016 11:09:12 +0800
> 
> > Strangely, I don't see this on the GNU/Linux system to which I have
> > access, although Emacs definitely calls pthread_mutex_unlock twice in
> > a row in the scenario of this bug report.  Is this some change in
> > latest versions of glibc?
> 
> Calling pthread_mutex_unlock() twice has to be undefined behaviour. In
> fact, it can never work. Imagine what would happen if a different thread
> called pthread_mutex_lock() on the mutex between two the two unlock
> calls. In that case, you'd be unlocking a mutex help by a different
> thread which is obviously very dangerous.

I'm not asking if this is undefined behavior; it clearly is.  I'm
asking whether the second of these two calls is actually the one that
crashes Emacs with SIGSEGV.  IOW, does the crash happen inside the
second call to pthread_mutex_unlock?  And the next question would be
why doesn't it crash for me on another GNU/Linux system?

Thanks.





  reply	other threads:[~2016-12-14  3:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  4:33 bug#25178: 26.0.50; Crash when pressing C-g in TTY mode Elias Martenson
2016-12-12 16:56 ` Eli Zaretskii
2016-12-13  2:52   ` Elias Martenson
2016-12-13  3:07   ` Elias Martenson
2016-12-13 18:45     ` Eli Zaretskii
2016-12-13 19:26       ` Andreas Schwab
2016-12-13 19:37         ` Eli Zaretskii
2016-12-13 20:12           ` Andreas Schwab
2016-12-14  3:13           ` Elias Martenson
2016-12-14  3:09       ` Elias Martenson
2016-12-14  3:39         ` Eli Zaretskii [this message]
2016-12-14  5:41           ` Elias Martenson
2016-12-17 13:58         ` Eli Zaretskii
2016-12-19  2:48           ` Elias Martenson
     [not found] ` <E1cJ1Z7-0000yc-Dd@eggs.gnu.org>
2017-01-05 23:39   ` npostavs
2017-01-06  7:47     ` Eli Zaretskii

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=83y3zj9o1x.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=25178@debbugs.gnu.org \
    --cc=elias.martenson@murex.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.