emacs-devel
[Top][All Lists]
Advanced

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

Re: Core dumps in redisplay.


From: David Kastrup
Subject: Re: Core dumps in redisplay.
Date: Mon, 28 Feb 2005 18:14:09 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Jan D." <address@hidden> writes:

>>
>> This sounds like normally only the main thread should ever be touching
>> interrupt_input_blocked, unless we have a bug.  Correct?  So we need
>> not think about how to synchronize accesses to the variable, but
>> rather make sure that no thread except the main thread will ever run
>> code touching it.  Correct?
>>
>> A use of BLOCK_INPUT or UNBLOCK_INPUT outside of the main thread is a
>> bug.  Correct?
>
> Yes times three.

I have got the debugging working.  Clearly xmalloc is called in a
separate thread (its BLOCK/UNBLOCK calls which are placed just round
malloc are interspersed with that of other routines), and its
deallocation interferes with the deallocation from the main thread.
So we should probably add an xassert into BLOCK_INPUT and
UNBLOCK_INPUT that complains when we are in anything but the main
thread.  And then see whether we can get rid of all the resulting
aborts in a sane manner.

If we don't do this, I am afraid that we will be plagued with
occasional unreproduceable aborts and/or problems.

I also doubt that it is a good idea to have mallocs in parallel
threads at the same time.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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