GNU bug report logs - #17298
24.4.50; emacs_backtrace

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 19 Apr 2014 15:01:02 UTC

Severity: normal

Tags: moreinfo

Merged with 16288, 16616, 16888, 16900, 16924, 16939, 16962, 17068, 17164

Found in versions 24.3.50, 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17298 in the body.
You can then email your comments to 17298 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17298; Package emacs. (Sat, 19 Apr 2014 15:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 19 Apr 2014 15:01:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; emacs_backtrace
Date: Sat, 19 Apr 2014 07:59:18 -0700 (PDT)
Backtrace:
012005a7
01200618
010f423a
01166aee
011dc47b
011dc7cf
011dc9a8
011dc9a0
011dc98e
011dc98e
011dc9a0
011dc98e
011dc98e
011dc98e
011dc98e
011dc98e
011dc98e
011dc9c5
01166662
011666b3
011646e8
010f233b
01184a37
011847d8
0110ebb0
0110e767
0110ea2f
0110ed06
0110ee2e
01184d08
011c5860
01185495
01184eef
01181f68
01029f0f
01029f4c
0110ed5d
01103b2c
0104220b
01041ea7
01045d89
01047551
0110958c
011cf677
0100f078
010fb02b
01107cc1
010f8395
01181c13
010f7cca
011811c0
010f7c82
010f7418
010f75d4
010f5766
010010f9
768b3386
770f9f6e
770f9f41




In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-04-16 on ODIEONE
Bzr revision: 116980 lekktu <at> gmail.com-20140416100338-8e5o24izbuy085jr
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17298; Package emacs. (Sat, 19 Apr 2014 15:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 17298 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 17298 <at> debbugs.gnu.org
Subject: Re: bug#17298: 24.4.50; emacs_backtrace
Date: Sat, 19 Apr 2014 17:42:53 +0200
??
??:0
w32_backtrace at w32fns.c:8476
emacs_abort at w32fns.c:8508
terminate_due_to_signal at emacs.c:382
die at alloc.c:6953
rotate_right at intervals.c:363
balance_an_interval at intervals.c:437
balance_intervals_internal at intervals.c:497
balance_intervals_internal at intervals.c:496
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:496
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:494
balance_intervals_internal at intervals.c:494
balance_intervals at intervals.c:505
sweep_buffers at alloc.c:6749
gc_sweep at alloc.c:6770
Fgarbage_collect at alloc.c:5678
maybe_gc at lisp.h:4523
Ffuncall at eval.c:2766
call2 at eval.c:2629
map_keymap_call at keymap.c:630
map_keymap_item at keymap.c:566
map_keymap_internal at keymap.c:605
map_keymap at keymap.c:650
Fmap_keymap at keymap.c:703
Ffuncall at eval.c:2822
exec_byte_code at bytecode.c:919
funcall_lambda at eval.c:2983
Ffuncall at eval.c:2864
internal_condition_case_n at eval.c:1436
safe_call at xdisp.c:2609
safe_call1 at xdisp.c:2625
map_keymap_canonical at keymap.c:668
menu_bar_items at keyboard.c:7433
update_menu_bar at xdisp.c:11728
prepare_menu_bars at xdisp.c:11623
redisplay_internal at xdisp.c:13426
redisplay_preserve_echo_area at xdisp.c:14013
detect_input_pending_run_timers at keyboard.c:9884
wait_reading_process_output at process.c:4700
sit_for at dispnew.c:5805
read_char at keyboard.c:2808
read_key_sequence at keyboard.c:9076
command_loop_1 at keyboard.c:1449
internal_condition_case at eval.c:1354
command_loop_2 at keyboard.c:1174
internal_catch at eval.c:1118
command_loop at keyboard.c:1153
recursive_edit_1 at keyboard.c:777
Frecursive_edit at keyboard.c:845
main at emacs.c:1654
?? at crt1.c:0
??
??:0
??
??:0
??
??:0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17298; Package emacs. (Sat, 19 Apr 2014 16:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 17298 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 17298 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#17298: 24.4.50; emacs_backtrace
Date: Sat, 19 Apr 2014 19:33:19 +0300
> From: Juanma Barranquero <lekktu <at> gmail.com>
> Date: Sat, 19 Apr 2014 17:42:53 +0200
> Cc: 17298 <at> debbugs.gnu.org
> 
> w32_backtrace at w32fns.c:8476
> emacs_abort at w32fns.c:8508
> terminate_due_to_signal at emacs.c:382
> die at alloc.c:6953
> rotate_right at intervals.c:363
> balance_an_interval at intervals.c:437
> balance_intervals_internal at intervals.c:497
> balance_intervals_internal at intervals.c:496
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:496
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:494
> balance_intervals_internal at intervals.c:494
> balance_intervals at intervals.c:505
> sweep_buffers at alloc.c:6749
> gc_sweep at alloc.c:6770
> Fgarbage_collect at alloc.c:5678
> maybe_gc at lisp.h:4523

Another duplicate of 16288.

I really wish someone who knows those parts of Emacs would look into
this problem.




Merged 16288 16616 16888 16900 16924 16939 16962 17068 17164 17298. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 19 Apr 2014 16:34:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17298; Package emacs. (Mon, 21 Apr 2014 01:59:01 GMT) Full text and rfc822 format available.

Message #16 received at 17298 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, 17298 <at> debbugs.gnu.org
Subject: Re: bug#17298: 24.4.50; emacs_backtrace
Date: Sun, 20 Apr 2014 21:57:59 -0400
> I really wish someone who knows those parts of Emacs would look into
> this problem.

I installed a patch which seems to make sense (makes the code agree
with the comment, at least), but I have a hard time believing that this
has been with us for so long and hasn't bitten us earlier.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17298; Package emacs. (Mon, 21 Apr 2014 07:17:02 GMT) Full text and rfc822 format available.

Message #19 received at 17298 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: lekktu <at> gmail.com, 17298 <at> debbugs.gnu.org
Subject: Re: bug#17298: 24.4.50; emacs_backtrace
Date: Mon, 21 Apr 2014 10:16:28 +0300
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: Juanma Barranquero <lekktu <at> gmail.com>, 17298 <at> debbugs.gnu.org
> Date: Sun, 20 Apr 2014 21:57:59 -0400
> 
> > I really wish someone who knows those parts of Emacs would look into
> > this problem.
> 
> I installed a patch which seems to make sense (makes the code agree
> with the comment, at least), but I have a hard time believing that this
> has been with us for so long and hasn't bitten us earlier.

Thanks.  I agree with your doubts.  Let's see what happens with these
assertion violations.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17298; Package emacs. (Wed, 23 Apr 2014 03:01:05 GMT) Full text and rfc822 format available.

Message #22 received at 17298 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, 17298 <at> debbugs.gnu.org
Subject: Re: bug#17298: 24.4.50; emacs_backtrace
Date: Sat, 19 Apr 2014 13:55:39 -0400
> I really wish someone who knows those parts of Emacs would look into
> this problem.

I don't know those parts very well, but it seems that the patch below
might make sense.

I have a hard time believing that we've lived with such a bug for so
many years, but this makes the code agree with the comment, and if you
look at the diagram before the function, I think the comment is right
and the code is wrong.

Just to clarify the crucial part of the patch is:

-  interval->total_length -= B->total_length - LEFT_TOTAL_LENGTH (interval);
+  interval->total_length -= B->total_length - TOTAL_LENGTH (c);


-- Stefan


=== modified file 'src/intervals.c'
--- src/intervals.c	2014-01-21 02:28:57 +0000
+++ src/intervals.c	2014-04-19 17:51:01 +0000
@@ -334,10 +334,16 @@
 static INTERVAL
 rotate_right (INTERVAL interval)
 {
-  INTERVAL i;
+  INTERVAL c;
   INTERVAL B = interval->left;
   ptrdiff_t old_total = interval->total_length;
 
+  eassert (TOTAL_LENGTH (interval) > 0);
+  eassert (TOTAL_LENGTH (interval)
+	   > TOTAL_LENGTH (B) + TOTAL_LENGTH (interval->right));
+  eassert (TOTAL_LENGTH (B)
+	   > TOTAL_LENGTH (B->left) + TOTAL_LENGTH (B->right));
+
   /* Deal with any Parent of A;  make it point to B.  */
   if (! ROOT_INTERVAL_P (interval))
     {
@@ -348,23 +354,23 @@
     }
   copy_interval_parent (B, interval);
 
-  /* Make B the parent of A */
-  i = B->right;
+  /* Make B the parent of A.  */
+  c = B->right;
   set_interval_right (B, interval);
   set_interval_parent (interval, B);
 
-  /* Make A point to c */
-  set_interval_left (interval, i);
-  if (i)
-    set_interval_parent (i, interval);
+  /* Make A point to c.  */
+  set_interval_left (interval, c);
+  if (c)
+    set_interval_parent (c, interval);
 
   /* A's total length is decreased by the length of B and its left child.  */
-  interval->total_length -= B->total_length - LEFT_TOTAL_LENGTH (interval);
-  eassert (TOTAL_LENGTH (interval) >= 0);
+  interval->total_length -= B->total_length - TOTAL_LENGTH (c);
+  eassert (TOTAL_LENGTH (interval) > 0);
 
   /* B must have the same total length of A.  */
   B->total_length = old_total;
-  eassert (TOTAL_LENGTH (B) >= 0);
+  eassert (TOTAL_LENGTH (B) > 0);
 
   return B;
 }
@@ -381,7 +387,7 @@
 static INTERVAL
 rotate_left (INTERVAL interval)
 {
-  INTERVAL i;
+  INTERVAL c;
   INTERVAL B = interval->right;
   ptrdiff_t old_total = interval->total_length;
 
@@ -395,23 +401,23 @@
     }
   copy_interval_parent (B, interval);
 
-  /* Make B the parent of A */
-  i = B->left;
+  /* Make B the parent of A.  */
+  c = B->left;
   set_interval_left (B, interval);
   set_interval_parent (interval, B);
 
-  /* Make A point to c */
-  set_interval_right (interval, i);
-  if (i)
-    set_interval_parent (i, interval);
+  /* Make A point to c.  */
+  set_interval_right (interval, c);
+  if (c)
+    set_interval_parent (c, interval);
 
   /* A's total length is decreased by the length of B and its right child.  */
-  interval->total_length -= B->total_length - RIGHT_TOTAL_LENGTH (interval);
-  eassert (TOTAL_LENGTH (interval) >= 0);
+  interval->total_length -= B->total_length - TOTAL_LENGTH (c);
+  eassert (TOTAL_LENGTH (interval) > 0);
 
   /* B must have the same total length of A.  */
   B->total_length = old_total;
-  eassert (TOTAL_LENGTH (B) >= 0);
+  eassert (TOTAL_LENGTH (B) > 0);
 
   return B;
 }





bug closed, send any further explanations to 16288 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 26 Dec 2015 01:42:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Jan 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 149 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.