all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17340: 24.4.50; emacs_backtrace.txt
@ 2014-04-25  2:49 Drew Adams
  2014-04-25  8:08 ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2014-04-25  2:49 UTC (permalink / raw)
  To: 17340



Backtrace:
01200a23
01200a94
010f448e
01166e6e
010f0190
010f0c00
010b6d9e
0113b694
0113ba47
0113b6e3
0113d2ad
01181f93
0113d7b5
010f60e7
010f4446
01166e6e
011dc92d
011dccd6
011dce22
011dce08
011dce1a
011dce08
011dce08
011dce08
011dce1a
011dce1a
011dce08
011dce1a
011dce08
011dce3f
011669e2
01166a33
01164a68
010f258f
011837c1
011b0eca
011afb30
01183450
01185088
011c5be0
01185815
0118526f
01184b1e
010f88cd
01181f93
010f7f1e
01181540
010f7ed6
010f766c
010f7828
010f59ba
010010f9
76d33386
77399f6e
77399f41




In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-04-21 on ODIEONE
Bzr revision: 117005 dancol@dancol.org-20140421180019-po4wdeg7gqvvlh5d
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''





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17340: 24.4.50; emacs_backtrace.txt
  2014-04-25  2:49 bug#17340: 24.4.50; emacs_backtrace.txt Drew Adams
@ 2014-04-25  8:08 ` Juanma Barranquero
  2014-04-25  8:57   ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2014-04-25  8:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: 17340

??
??: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:6955
XVECTOR at lisp.h:821
AREF at lisp.h:1308
coding_inherit_eol_type at coding.c:6031
Fchoose_write_coding_system at fileio.c:4632
write_region at fileio.c:4802
Fwrite_region at fileio.c:4676
auto_save_1 at fileio.c:5456
internal_condition_case at eval.c:1354
Fdo_auto_save at fileio.c:5666
shut_down_emacs at emacs.c:2033
terminate_due_to_signal at emacs.c:366
die at alloc.c:6955
rotate_left at intervals.c:393
balance_an_interval at intervals.c:455
balance_intervals_internal at intervals.c:505
balance_intervals_internal at intervals.c:502
balance_intervals_internal at intervals.c:504
balance_intervals_internal at intervals.c:502
balance_intervals_internal at intervals.c:502
balance_intervals_internal at intervals.c:502
balance_intervals_internal at intervals.c:504
balance_intervals_internal at intervals.c:504
balance_intervals_internal at intervals.c:502
balance_intervals_internal at intervals.c:504
balance_intervals_internal at intervals.c:502
balance_intervals at intervals.c:513
sweep_buffers at alloc.c:6751
gc_sweep at alloc.c:6772
Fgarbage_collect at alloc.c:5680
maybe_gc at lisp.h:4514
eval_sub at eval.c:2084
readevalloop at lread.c:1934
Fload at lread.c:1363
Fautoload_do_load at eval.c:1970
Ffuncall at eval.c:2822
exec_byte_code at bytecode.c:916
funcall_lambda at eval.c:2983
Ffuncall at eval.c:2864
call1 at eval.c:2614
command_loop_1 at keyboard.c:1556
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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17340: 24.4.50; emacs_backtrace.txt
  2014-04-25  8:08 ` Juanma Barranquero
@ 2014-04-25  8:57   ` Eli Zaretskii
  2014-04-25 16:40     ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2014-04-25  8:57 UTC (permalink / raw)
  To: Juanma Barranquero, Stefan Monnier; +Cc: 17340

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Fri, 25 Apr 2014 10:08:18 +0200
> Cc: 17340@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:6955
> XVECTOR at lisp.h:821
> AREF at lisp.h:1308
> coding_inherit_eol_type at coding.c:6031
> Fchoose_write_coding_system at fileio.c:4632
> write_region at fileio.c:4802
> Fwrite_region at fileio.c:4676
> auto_save_1 at fileio.c:5456
> internal_condition_case at eval.c:1354
> Fdo_auto_save at fileio.c:5666
> shut_down_emacs at emacs.c:2033
> terminate_due_to_signal at emacs.c:366
> die at alloc.c:6955
> rotate_left at intervals.c:393  <<<<<<<<<<<<<<<<<<<<<<<
> balance_an_interval at intervals.c:455

This one's definitely related to Stefan's latest changes.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17340: 24.4.50; emacs_backtrace.txt
  2014-04-25  8:57   ` Eli Zaretskii
@ 2014-04-25 16:40     ` Stefan Monnier
  2014-04-30  0:06       ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2014-04-25 16:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Juanma Barranquero, 17340

>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> From: Juanma Barranquero <lekktu@gmail.com>
>> Date: Fri, 25 Apr 2014 10:08:18 +0200
>> Cc: 17340@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:6955
>> XVECTOR at lisp.h:821
>> AREF at lisp.h:1308
>> coding_inherit_eol_type at coding.c:6031
>> Fchoose_write_coding_system at fileio.c:4632
>> write_region at fileio.c:4802
>> Fwrite_region at fileio.c:4676
>> auto_save_1 at fileio.c:5456
>> internal_condition_case at eval.c:1354
>> Fdo_auto_save at fileio.c:5666
>> shut_down_emacs at emacs.c:2033
>> terminate_due_to_signal at emacs.c:366
>> die at alloc.c:6955
>> rotate_left at intervals.c:393  <<<<<<<<<<<<<<<<<<<<<<<
>> balance_an_interval at intervals.c:455

> This one's definitely related to Stefan's latest changes.

Could you run with the patch below (and enable_checking, obviously), to
try and catch the problem sooner?


        Stefan


=== modified file 'src/intervals.c'
--- src/intervals.c	2014-04-19 18:13:26 +0000
+++ src/intervals.c	2014-04-25 16:38:44 +0000
@@ -110,13 +110,14 @@
       set_string_intervals (parent, new);
       new->position = 0;
     }
+  eassert (LENGTH (new) > 0);
 
   set_interval_object (new, parent);
 
   return new;
 }
 
-/* Make the interval TARGET have exactly the properties of SOURCE */
+/* Make the interval TARGET have exactly the properties of SOURCE.  */
 
 void
 copy_properties (register INTERVAL source, register INTERVAL target)
@@ -176,10 +177,10 @@
   Lisp_Object i1_cdr, i1_val;
 
   if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1))
-    return 1;
+    return true;
 
   if (DEFAULT_INTERVAL_P (i0) || DEFAULT_INTERVAL_P (i1))
-    return 0;
+    return false;
 
   i0_cdr = i0->plist;
   i1_cdr = i1->plist;
@@ -188,31 +189,31 @@
       i0_sym = XCAR (i0_cdr);
       i0_cdr = XCDR (i0_cdr);
       if (!CONSP (i0_cdr))
-	return 0;
+	return false;
       i1_val = i1->plist;
       while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym))
 	{
 	  i1_val = XCDR (i1_val);
 	  if (!CONSP (i1_val))
-	    return 0;
+	    return false;
 	  i1_val = XCDR (i1_val);
 	}
 
       /* i0 has something i1 doesn't.  */
       if (EQ (i1_val, Qnil))
-	return 0;
+	return false;
 
       /* i0 and i1 both have sym, but it has different values in each.  */
       if (!CONSP (i1_val)
 	  || (i1_val = XCDR (i1_val), !CONSP (i1_val))
 	  || !EQ (XCAR (i1_val), XCAR (i0_cdr)))
-	return 0;
+	return false;
 
       i0_cdr = XCDR (i0_cdr);
 
       i1_cdr = XCDR (i1_cdr);
       if (!CONSP (i1_cdr))
-	return 0;
+	return false;
       i1_cdr = XCDR (i1_cdr);
     }
 
@@ -339,10 +340,8 @@
   ptrdiff_t old_total = A->total_length;
 
   eassert (old_total > 0);
-  eassert (old_total
-	   > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->right));
-  eassert (TOTAL_LENGTH (B)
-	   > TOTAL_LENGTH (B->left) + TOTAL_LENGTH (c));
+  eassert (LENGTH (A) > 0);
+  eassert (LENGTH (B) > 0);
 
   /* Deal with any Parent of A;  make it point to B.  */
   if (! ROOT_INTERVAL_P (A))
@@ -366,9 +365,11 @@
   /* A's total length is decreased by the length of B and its left child.  */
   A->total_length -= B->total_length - TOTAL_LENGTH (c);
   eassert (TOTAL_LENGTH (A) > 0);
+  eassert (LENGTH (A) > 0);
 
   /* B must have the same total length of A.  */
   B->total_length = old_total;
+  eassert (LENGTH (B) > 0);
 
   return B;
 }
@@ -390,10 +391,8 @@
   ptrdiff_t old_total = A->total_length;
 
   eassert (old_total > 0);
-  eassert (old_total
-	   > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->left));
-  eassert (TOTAL_LENGTH (B)
-	   > TOTAL_LENGTH (B->right) + TOTAL_LENGTH (c));
+  eassert (LENGTH (A) > 0);
+  eassert (LENGTH (B) > 0);
 
   /* Deal with any parent of A;  make it point to B.  */
   if (! ROOT_INTERVAL_P (A))
@@ -417,9 +416,11 @@
   /* A's total length is decreased by the length of B and its right child.  */
   A->total_length -= B->total_length - TOTAL_LENGTH (c);
   eassert (TOTAL_LENGTH (A) > 0);
+  eassert (LENGTH (A) > 0);
 
   /* B must have the same total length of A.  */
   B->total_length = old_total;
+  eassert (LENGTH (B) > 0);
 
   return B;
 }
@@ -432,6 +433,9 @@
 {
   register ptrdiff_t old_diff, new_diff;
 
+  eassert (LENGTH (i) > 0);
+  eassert (TOTAL_LENGTH (i) >= LENGTH (i));
+
   while (1)
     {
       old_diff = LEFT_TOTAL_LENGTH (i) - RIGHT_TOTAL_LENGTH (i);
@@ -468,16 +472,16 @@
 balance_possible_root_interval (INTERVAL interval)
 {
   Lisp_Object parent;
-  bool have_parent = 0;
-
-  if (!INTERVAL_HAS_OBJECT (interval) && !INTERVAL_HAS_PARENT (interval))
-    return interval;
+  bool have_parent = false;
 
   if (INTERVAL_HAS_OBJECT (interval))
     {
-      have_parent = 1;
+      have_parent = true;
       GET_INTERVAL_OBJECT (parent, interval);
     }
+  else if (!INTERVAL_HAS_PARENT (interval))
+    return interval;
+
   interval = balance_an_interval (interval);
 
   if (have_parent)
@@ -553,7 +557,7 @@
     {
       set_interval_right (interval, new);
       new->total_length = new_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
+      eassert (LENGTH (new) > 0);
     }
   else
     {
@@ -562,7 +566,6 @@
       set_interval_parent (interval->right, new);
       set_interval_right (interval, new);
       new->total_length = new_length + new->right->total_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
       balance_an_interval (new);
     }
 
@@ -598,7 +601,7 @@
     {
       set_interval_left (interval, new);
       new->total_length = new_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
+      eassert (LENGTH (new) > 0);
     }
   else
     {
@@ -607,7 +610,6 @@
       set_interval_parent (new->left, new);
       set_interval_left (interval, new);
       new->total_length = new_length + new->left->total_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
       balance_an_interval (new);
     }
 
@@ -796,7 +798,7 @@
 	    {
 	      i->left->position = i->position - TOTAL_LENGTH (i->left)
 		+ LEFT_TOTAL_LENGTH (i->left);
-	      i = i->left;		/* Move to the left child */
+	      i = i->left;		/* Move to the left child.  */
 	    }
 	  else if (NULL_PARENT (i))
 	    error ("Point before start of properties");
@@ -811,7 +813,7 @@
 	    {
 	      i->right->position = INTERVAL_LAST_POS (i)
 	        + LEFT_TOTAL_LENGTH (i->right);
-	      i = i->right;		/* Move to the right child */
+	      i = i->right;		/* Move to the right child.  */
 	    }
 	  else if (NULL_PARENT (i))
 	    error ("Point %"pD"d after end of properties", pos);
@@ -958,7 +960,6 @@
       for (temp = prev ? prev : i; temp; temp = INTERVAL_PARENT_OR_NULL (temp))
 	{
 	  temp->total_length += length;
-	  eassert (TOTAL_LENGTH (temp) >= 0);
 	  temp = balance_possible_root_interval (temp);
 	}
 
@@ -1014,7 +1015,6 @@
       for (temp = i; temp; temp = INTERVAL_PARENT_OR_NULL (temp))
 	{
 	  temp->total_length += length;
-	  eassert (TOTAL_LENGTH (temp) >= 0);
 	  temp = balance_possible_root_interval (temp);
 	}
     }
@@ -1216,9 +1216,10 @@
       this = this->left;
       this->total_length += migrate_amt;
     }
-  eassert (TOTAL_LENGTH (this) >= 0);
   set_interval_left (this, migrate);
   set_interval_parent (migrate, this);
+  eassert (LENGTH (this) > 0);
+  eassert (LENGTH (i->right) > 0);
 
   return i->right;
 }
@@ -1298,7 +1299,7 @@
 							 relative_position,
 							 amount);
       tree->total_length -= subtract;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) > 0);
       return subtract;
     }
   /* Right branch.  */
@@ -1313,7 +1314,7 @@
 					       relative_position,
 					       amount);
       tree->total_length -= subtract;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) > 0);
       return subtract;
     }
   /* Here -- this node.  */
@@ -1328,7 +1329,7 @@
 	amount = my_amount;
 
       tree->total_length -= amount;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) >= 0);
       if (LENGTH (tree) == 0)
 	delete_interval (tree);
 
@@ -1370,7 +1371,7 @@
   if (ONLY_INTERVAL_P (tree))
     {
       tree->total_length -= length;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) > 0);
       return;
     }
 
@@ -1430,12 +1431,12 @@
       while (! NULL_LEFT_CHILD (successor))
 	{
 	  successor->total_length += absorb;
-	  eassert (TOTAL_LENGTH (successor) >= 0);
+	  eassert (LENGTH (successor) > 0);
 	  successor = successor->left;
 	}
 
       successor->total_length += absorb;
-      eassert (TOTAL_LENGTH (successor) >= 0);
+      eassert (LENGTH (successor) > 0);
       delete_interval (i);
       return successor;
     }
@@ -1457,7 +1458,7 @@
 
       successor = INTERVAL_PARENT (successor);
       successor->total_length -= absorb;
-      eassert (TOTAL_LENGTH (successor) >= 0);
+      eassert (LENGTH (successor) > 0);
     }
 
   /* This must be the rightmost or last interval and cannot
@@ -1486,12 +1487,12 @@
       while (! NULL_RIGHT_CHILD (predecessor))
 	{
 	  predecessor->total_length += absorb;
-	  eassert (TOTAL_LENGTH (predecessor) >= 0);
+	  eassert (LENGTH (predecessor) > 0);
 	  predecessor = predecessor->right;
 	}
 
       predecessor->total_length += absorb;
-      eassert (TOTAL_LENGTH (predecessor) >= 0);
+      eassert (LENGTH (predecessor) > 0);
       delete_interval (i);
       return predecessor;
     }
@@ -1513,7 +1514,7 @@
 
       predecessor = INTERVAL_PARENT (predecessor);
       predecessor->total_length -= absorb;
-      eassert (TOTAL_LENGTH (predecessor) >= 0);
+      eassert (LENGTH (predecessor) > 0);
     }
 
   /* This must be the leftmost or first interval and cannot
@@ -1528,6 +1529,8 @@
 {
   register INTERVAL target = make_interval ();
 
+  eassert (LENGTH (source) > 0);
+
   target->total_length = source->total_length;
   target->position = source->position;
 
@@ -1538,6 +1541,7 @@
   if (! NULL_RIGHT_CHILD (source))
     set_interval_right (target, reproduce_tree (source->right, target));
 
+  eassert (LENGTH (target) > 0);
   return target;
 }
 
@@ -1766,7 +1770,7 @@
 
   if (! NILP (fallback))
     return fallback;
-  /* Check for alternative properties */
+  /* Check for alternative properties.  */
   tail = Fassq (prop, Vchar_property_alias_alist);
   if (! NILP (tail))
     {
@@ -2434,7 +2438,7 @@
 				 end, end_byte);
     }
 
-  /* Rounding to char boundaries can theoretically ake this interval
+  /* Rounding to char boundaries can theoretically make this interval
      spurious.  If so, delete one child, and copy its property list
      to this interval.  */
   if (LEFT_TOTAL_LENGTH (i) + RIGHT_TOTAL_LENGTH (i) >= TOTAL_LENGTH (i))






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17340: 24.4.50; emacs_backtrace.txt
  2014-04-25 16:40     ` Stefan Monnier
@ 2014-04-30  0:06       ` Juanma Barranquero
  2014-04-30  0:18         ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Juanma Barranquero @ 2014-04-30  0:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: 17340

On Fri, Apr 25, 2014 at 6:40 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> Could you run with the patch below (and enable_checking, obviously), to
> try and catch the problem sooner?

Drew, do you want a special build from trunk with this patch?

    J





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17340: 24.4.50; emacs_backtrace.txt
  2014-04-30  0:06       ` Juanma Barranquero
@ 2014-04-30  0:18         ` Drew Adams
  2014-04-30  2:18           ` Juanma Barranquero
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2014-04-30  0:18 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: 17340

> > Could you run with the patch below (and enable_checking, obviously), to
> > try and catch the problem sooner?
> 
> Drew, do you want a special build from trunk with this patch?

Uh, OK I guess.  I'll be glad to try it for a while.  But I have no
idea how to repro the crash, so if it does not crash in the same way
we won't know much, I'm guessing.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#17340: 24.4.50; emacs_backtrace.txt
  2014-04-30  0:18         ` Drew Adams
@ 2014-04-30  2:18           ` Juanma Barranquero
  0 siblings, 0 replies; 7+ messages in thread
From: Juanma Barranquero @ 2014-04-30  2:18 UTC (permalink / raw)
  To: Drew Adams; +Cc: 17340

> Uh, OK I guess.  I'll be glad to try it for a while.

It's up as emacs-trunk-20140430-r117031-bin-i386.zip

> But I have no
> idea how to repro the crash, so if it does not crash in the same way
> we won't know much, I'm guessing.

Worth trying anyway.

    J





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-04-30  2:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25  2:49 bug#17340: 24.4.50; emacs_backtrace.txt Drew Adams
2014-04-25  8:08 ` Juanma Barranquero
2014-04-25  8:57   ` Eli Zaretskii
2014-04-25 16:40     ` Stefan Monnier
2014-04-30  0:06       ` Juanma Barranquero
2014-04-30  0:18         ` Drew Adams
2014-04-30  2:18           ` Juanma Barranquero

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.