bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25178: (no subject)


From: eliz
Subject: bug#25178: (no subject)
Date: Mon, 19 Dec 2016 12:17:37 -0500

þÿDate: Mon, 19 Dec 2016 19:17:02 +0200
þÿMessage-Id: <83r3534z5d.fsf@gnu.org>
þÿFrom: Eli Zaretskii <eliz@gnu.org>
þÿTo: Elias Martenson 
<elias.martenson@murex.com>
þÿCC: 25178@debbugs.gnu.org
þÿIn-reply-to: 
<yxd837hkocrb.fsf@murex.com> (message 
from Elias Martenson on
þÿ     Mon, 19 Dec 2016 10:48:08 +0800)
þÿSubject: Re: bug#25178: 26.0.50; Crash 
when pressing C-g in TTY mode
þÿReply-to: Eli Zaretskii <eliz@gnu.org>
þÿReferences: 
<yxd8twa9g41u.fsf@murex.com> 
<83bmwhccib.fsf@gnu.org>
þÿ     <yxd8wpf4msrn.fsf@murex.com> 
<838trjbrcq.fsf@gnu.org>
þÿ     <yxd8oa0fmckn.fsf@murex.com> 
<83eg167j31.fsf@gnu.org> 
<yxd837hkocrb.fsf@murex.com>
þÿ
þÿ> From: Elias Martenson 
<elias.martenson@murex.com>
þÿ> CC: <25178@debbugs.gnu.org>
þÿ> Date: Mon, 19 Dec 2016 10:48:08 +0800
þÿ> 
þÿ> > Eli Zaretskii <eliz@gnu.org> 
writes:
þÿ> > 
þÿ> > > From: Elias Martenson 
<elias.martenson@murex.com>
þÿ> > > CC: <25178@debbugs.gnu.org>
þÿ> > > Date: Wed, 14 Dec 2016 11:09:12 
+0800
þÿ> > > 
þÿ> > > 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.
þÿ> > 
þÿ> > Can you try the patch below and 
see if it stops the crashes?  With
þÿ> > this patch, I no longer see two 
calls to pthread_mutex_unlock in a
þÿ> > row.
þÿ> 
þÿ> I've tried it, and I am now unable 
to reproduce the problem. Thanks a
þÿ> lot!
þÿ
þÿThanks, pushed.  Please test.
þÿ
þÿ> > Would people who know about 
signals and threads please eyeball this
þÿ> > patch and comment on whether it is 
correct, safe, etc.?  TIA.
þÿ> 
þÿ> I'm quite well-versed on the topic 
of threading, but not so much in the
þÿ> internals of Emacs, but I'm looking 
at it now.
þÿ
þÿThanks.
þÿ
þÿ> I do have a non-technical comment 
though, about the function
þÿ> unblock_interrupt_signal(). As far 
as I can tell, it doesn't do what the
þÿ> function name suggests it does. I'd 
rather name it set_signal_mask(),
þÿ> since that's what it does.
þÿ
þÿI renamed it to restore_signal_mask.
þÿ
þÿP.S. your mailer does something weird: 
it appends a disclaimer
þÿencoded in UTF-16, which marks your 
entire mail as encoded in UTF-16,
þÿand that makes the body unreadable 
gibberish.  I needed some juggling
þÿto restore the payload.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]