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: <address@hidden>
þÿFrom: Eli Zaretskii <address@hidden>
þÿTo: Elias Martenson <address@hidden>
þÿCC: address@hidden
þÿIn-reply-to: <address@hidden> (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 <address@hidden>
þÿReferences: <address@hidden> <address@hidden>
þÿ     <address@hidden> <address@hidden>
þÿ     <address@hidden> <address@hidden> <address@hidden>
þÿ
þÿ> From: Elias Martenson <address@hidden>
þÿ> CC: <address@hidden>
þÿ> Date: Mon, 19 Dec 2016 10:48:08 +0800
þÿ> 
þÿ> > Eli Zaretskii <address@hidden> writes:
þÿ> > 
þÿ> > > From: Elias Martenson <address@hidden>
þÿ> > > CC: <address@hidden>
þÿ> > > 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]