* bug#17298: 24.4.50; emacs_backtrace @ 2014-04-19 14:59 Drew Adams 2014-04-19 15:42 ` Juanma Barranquero 0 siblings, 1 reply; 6+ messages in thread From: Drew Adams @ 2014-04-19 14:59 UTC (permalink / raw) To: 17298 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@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'' ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17298: 24.4.50; emacs_backtrace 2014-04-19 14:59 bug#17298: 24.4.50; emacs_backtrace Drew Adams @ 2014-04-19 15:42 ` Juanma Barranquero 2014-04-19 16:33 ` Eli Zaretskii 0 siblings, 1 reply; 6+ messages in thread From: Juanma Barranquero @ 2014-04-19 15:42 UTC (permalink / raw) To: Drew Adams; +Cc: 17298 ?? ??: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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17298: 24.4.50; emacs_backtrace 2014-04-19 15:42 ` Juanma Barranquero @ 2014-04-19 16:33 ` Eli Zaretskii 2014-04-19 17:55 ` Stefan Monnier 2014-04-21 1:57 ` Stefan Monnier 0 siblings, 2 replies; 6+ messages in thread From: Eli Zaretskii @ 2014-04-19 16:33 UTC (permalink / raw) To: Juanma Barranquero; +Cc: 17298 > From: Juanma Barranquero <lekktu@gmail.com> > Date: Sat, 19 Apr 2014 17:42:53 +0200 > Cc: 17298@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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17298: 24.4.50; emacs_backtrace 2014-04-19 16:33 ` Eli Zaretskii @ 2014-04-19 17:55 ` Stefan Monnier 2014-04-21 1:57 ` Stefan Monnier 1 sibling, 0 replies; 6+ messages in thread From: Stefan Monnier @ 2014-04-19 17:55 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Juanma Barranquero, 17298 > 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; } ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17298: 24.4.50; emacs_backtrace 2014-04-19 16:33 ` Eli Zaretskii 2014-04-19 17:55 ` Stefan Monnier @ 2014-04-21 1:57 ` Stefan Monnier 2014-04-21 7:16 ` Eli Zaretskii 1 sibling, 1 reply; 6+ messages in thread From: Stefan Monnier @ 2014-04-21 1:57 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Juanma Barranquero, 17298 > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#17298: 24.4.50; emacs_backtrace 2014-04-21 1:57 ` Stefan Monnier @ 2014-04-21 7:16 ` Eli Zaretskii 0 siblings, 0 replies; 6+ messages in thread From: Eli Zaretskii @ 2014-04-21 7:16 UTC (permalink / raw) To: Stefan Monnier; +Cc: lekktu, 17298 > From: Stefan Monnier <monnier@IRO.UMontreal.CA> > Cc: Juanma Barranquero <lekktu@gmail.com>, 17298@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. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-04-21 7:16 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-19 14:59 bug#17298: 24.4.50; emacs_backtrace Drew Adams 2014-04-19 15:42 ` Juanma Barranquero 2014-04-19 16:33 ` Eli Zaretskii 2014-04-19 17:55 ` Stefan Monnier 2014-04-21 1:57 ` Stefan Monnier 2014-04-21 7:16 ` Eli Zaretskii
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.