emacs-devel
[Top][All Lists]
Advanced

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

Re: intervals.c:1190: Emacs fatal error: assertion failed: amt == 0


From: Eli Zaretskii
Subject: Re: intervals.c:1190: Emacs fatal error: assertion failed: amt == 0
Date: Sun, 05 Apr 2020 16:07:01 +0300

> Date: Sun, 05 Apr 2020 07:42:29 +0200 (CEST)
> Cc: address@hidden
> From: Werner LEMBERG <address@hidden>
> 
> 1. Save your '~/Mail' order in case you have one, then do
> 
>      mkdir Mail
>      cd Mail
>      mkdir inbox
> 
>    in your home directory.  Uncompress and copy the attached file
>    '633.gz' into the just created 'inbox' directory.
> 
> 2. Install mew.  I do this directly from the git repository.
> 
>      git clone git://github.com/kazu-yamamoto/Mew.git
>      cd Mew
>      ./configure
>      make
>      make install
> 
>    Let's assume this gets installed into the default location
> 
>      /usr/local/share/emacs/site-lisp/mew
> 
> 3. Start emacs in 'src' directory with
> 
>      gdb --args ./emacs -Q
> 
> 4. In the '*scratch*' buffer, evaluate
> 
>      (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mew")
> 
> 5. Execute
> 
>      load-library mew
>      mew
> 
> And voilĂ .

Thanks.  An 8-year old mystery that was left unsolved strikes back.

Does the patch below fix the problem for you?  It fixes the assertion
violation on my system, but the message comes out with some raw bytes,
and its coding-system is set to ctext, which sounds wrong (should be
UTF-8, I think).  Is this normal or expected for this particular
message?

Regarding the patch: a very similar issue was discussed here:

  https://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00399.html

It started happening when the assertion was changed to reject negative
values.  At that time, Andreas (CC'ed) suggested a change that would
allow us to keep the amt == 0 assertion; maybe he will have a solution
along those lines in this case as well.  If not, I will install the
below on the emacs-27 branch some time soon.

Here's the patch:

diff --git a/src/intervals.c b/src/intervals.c
index a66594c..585ef18 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1187,7 +1187,7 @@ delete_interval (register INTERVAL i)
   register INTERVAL parent;
   ptrdiff_t amt = LENGTH (i);
 
-  eassert (amt == 0);          /* Only used on zero-length intervals now.  */
+  eassert (amt <= 0);  /* Only used on zero total-length intervals now.  */
 
   if (ROOT_INTERVAL_P (i))
     {




reply via email to

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