From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: intervals.c:1190: Emacs fatal error: assertion failed: amt == 0 Date: Sun, 05 Apr 2020 16:07:01 +0300 Message-ID: <83blo6t72i.fsf@gnu.org> References: <83k12vvahm.fsf@gnu.org> <20200404.225640.1186568552591832507.wl@gnu.org> <83h7xyu0jz.fsf@gnu.org> <20200405.074229.355980267956598184.wl@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="79239"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andreas Schwab , emacs-devel@gnu.org To: Werner LEMBERG Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Apr 05 15:08:15 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jL50Y-000KVX-Up for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Apr 2020 15:08:14 +0200 Original-Received: from localhost ([::1]:47780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL50Y-0007Jy-2m for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Apr 2020 09:08:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52518) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jL4zW-0006Tc-NL for emacs-devel@gnu.org; Sun, 05 Apr 2020 09:07:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36331) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jL4zV-0007ae-QY; Sun, 05 Apr 2020 09:07:09 -0400 Original-Received: from [176.228.60.248] (port=2419 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jL4zV-0000FB-3v; Sun, 05 Apr 2020 09:07:09 -0400 In-Reply-To: <20200405.074229.355980267956598184.wl@gnu.org> (message from Werner LEMBERG on Sun, 05 Apr 2020 07:42:29 +0200 (CEST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246449 Archived-At: > Date: Sun, 05 Apr 2020 07:42:29 +0200 (CEST) > Cc: emacs-devel@gnu.org > From: Werner LEMBERG > > 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)) {