Subject: bug#6540: 23.2; 23.2.1 (i386-mingw-nt6.1.7600) crashes too

From: Eli Zaretskii <[email-masked]>
Date: Sat, 07 Jan 2012 10:24:10 +0200

> From: Lars Magne Ingebrigtsen <[email-masked]>
> Date: Sat, 07 Jan 2012 05:36:43 +0100
> Cc: [email-masked]
> 
> Lars Magne Ingebrigtsen <[email-masked]> writes:
> 
> > oCameLo <[email-masked]> writes:
> >
> >> Steps to reproduce:
> >>
> >>  - emacs -q
> >>
> >>  - (setq cache-long-line-scans t)
> >>    C-x C-e
> >>
> >>  - (insert (prin1-to-string (x-list-fonts "*")))
> >>    C-j
> >
> > I'm unable to reproduce this with Emacs 24 under Linux.  Has this bug
> > gone away in Emacs 24 for you, too?
> 
> More information was requested, but no response was given within a few
> months, so I'm closing this bug report.  If the problem still exists,
> please reopen this bug report.

I will reopen it, because it can be easily reproduced with the current
trunk.  For the record, the backtrace is below.

  Breakpoint 1, w32_abort () at w32fns.c:7193
  7193      button = MessageBox (NULL,
  (gdb) bt
  #0  w32_abort () at w32fns.c:7193
  #1  0x012f7f19 in set_cache_region (c=0x357d1a0, start=269, end=110364,
      value=1) at region-cache.c:387
  #2  0x012f860b in know_region_cache (buf=0x32a6000, c=0x357d1a0, start=269,
      end=110364) at region-cache.c:694
  #3  0x010fbc5d in scan_buffer (target=10, start=110361, end=1, count=-1,
      shortage=0x0, allow_quit=0) at search.c:793
  #4  0x010fc0c4 in find_next_newline_no_quit (from=110361, cnt=-1)
      at search.c:935
  #5  0x01166d9d in back_to_previous_line_start (it=0x82dcb0) at xdisp.c:5711
  #6  0x0116726e in back_to_previous_visible_line_start (it=0x82dcb0)
      at xdisp.c:5855
  #7  0x0116fc5a in move_it_vertically_backward (it=0x82dcb0, dy=264)
      at xdisp.c:8744
  #8  0x011876b1 in redisplay_window (window=59080197, just_this_one_p=0)
      at xdisp.c:15649
  #9  0x0117fc3e in redisplay_window_0 (window=59080197) at xdisp.c:13603
  #10 0x01033d0b in internal_condition_case_1 (
      bfun=0x117fc0c <redisplay_window_0>, arg=59080197, handlers=53054174,
      hfun=0x117fbeb <redisplay_window_error>) at eval.c:1537
  #11 0x0117fbdb in redisplay_windows (window=59080197) at xdisp.c:13583
  #12 0x0117db7e in redisplay_internal () at xdisp.c:13160
  #13 0x0117ae70 in redisplay () at xdisp.c:12383
  #14 0x010087e2 in read_char (commandflag=1, nmaps=2, maps=0x82fa30,
      prev_event=53069850, used_mouse_menu=0x82fb5c, end_time=0x0)
      at keyboard.c:2444
  #15 0x0101c232 in read_key_sequence (keybuf=0x82fc60, bufsize=30,
      prompt=53069850, dont_downcase_last=0, can_return_switch_frame=1,
      fix_current_buffer=1) at keyboard.c:9300
  #16 0x01005aa8 in command_loop_1 () at keyboard.c:1448
  #17 0x01033bfb in internal_condition_case (bfun=0x10054b6 <command_loop_1>,
      handlers=53127578, hfun=0x1004ce0 <cmd_error>) at eval.c:1499
  #18 0x0100511c in command_loop_2 (ignore=53069850) at keyboard.c:1159
  #19 0x010335bb in internal_catch (tag=53125602,
      func=0x10050f9 <command_loop_2>, arg=53069850) at eval.c:1256
  #20 0x010050d4 in command_loop () at keyboard.c:1138
  #21 0x0100469e in recursive_edit_1 () at keyboard.c:758
  #22 0x010049c0 in Frecursive_edit () at keyboard.c:822
  #23 0x010027c8 in main (argc=2, argv=0xa32880) at emacs.c:1715
  (gdb) up
  #1  0x012f7f19 in set_cache_region (c=0x357d1a0, start=269, end=110364,
      value=1) at region-cache.c:387
  387         abort ();
  (gdb) l
  382     {
  383       if (start > end)
  384         abort ();
  385       if (start < c->buffer_beg
  386           || end   > c->buffer_end)
  387         abort ();
  388
  389       /* Eliminate this case; then we can assume that start and end-1 are
  390          both the locations of real characters in the buffer.  */
  391       if (start == end)
  (gdb) p c->buffer_beg
  $1 = 1
  (gdb) p c->buffer_end
  $2 = 110362