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

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

Re: Ediff frequently crashes emacs.


From: Kim F. Storm
Subject: Re: Ediff frequently crashes emacs.
Date: Tue, 30 Nov 2004 11:12:21 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Peter Seibel <address@hidden> writes:

> address@hidden (Kim F. Storm) writes:
>
>> Peter Seibel <address@hidden> writes:
>>
>>>> Could you try to change this line in lisp.h to possibly trigger the
>>>> bug faster:
>>>>
>>>> #if 0
>>>> /* Define this temporarily to hunt a bug.  If defined, the size of
>>>>
>>>> to
>>>>
>>>> #if 1
>>>> /* Define this temporarily to hunt a bug.  If defined, the size of
>>>
>>> Okay. Will do.
>>>
>>
>> I have just installed some further checks for memory overruns etc.
>> They are off by default, but you can enable them by the change
>> to lisp.h described above.
>
> Hmmm. I pulled the latest from CVS and made the change to lisp.h and
> make bootstrap fails with a SIGSEGV. Setting the 1 back to 0 in lisp.h
> allows me to build (modulo errors while building the docs in lispref).

Hm, I saw something similar with a more aggressive version of the checks.

Notably it crashed in various libc functions (setlocale, tzset)
because they didn't seem to obey the malloc_hook and free_hook in a
consistent manner, i.e. some data would be malloc'ed via the hook, but
free'd without the hook--at least I saw the same piece of memory being
malloc'ed twice by setlocale with no call to the free hook in-between.

Perhaps, the crashes could be related to such errors in other libc
functions, calling malloc/free without going through the hooks to
properly use emacs_blocked_malloc and emacs_blocked_free.

I think that could mess up the heap.

If we could find other functions which did something like that,
we could try to protect them with BLOCK_INPUT...  (sigh).


BTW, when XMALLOC_OVERRUN_CHECK is defined, the call to
free(malloc_state_ptr) in malloc_initialize_hook causes a
consistent trap (in _int_free) when the dumped emacs was started.
As a quick hack, I just disabled that specific free in this case.

>
> When I get a chance later I'll see if can track down what is happening
> during the build but I don't have time now.

If it crashes in somewhere in libc please me where.

To get further, you can try to disable the XMALLOC_OVERRUN_CHECK
define in lisp.h:

/* #define GC_CHECK_STRING_OVERRUN 1 */

and see if that makes a change.


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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