Subject: bug#10035: Crash in check_x_frame in w32fns.c

From: Juanma Barranquero <[email-masked]>
Date: Tue, 15 Nov 2011 18:12:47 +0100

I just had another assertion failure in row_equal_p, which seems a
variant of the bug you fixed. In this case, "pgrowx a" and "pgrowx b"
do not show the same content, but a->hash == b->hash.

I was just editing elisp code, and the assertion failure happened
during an isearch for "lets".

I'm keeping the gdb session open, in case you need more info.

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 4268.0xa18]
0x7708280d in KERNELBASE!DeleteAce () from C:\Windows\syswow64\KernelBase.dll
(gdb) bt
#0  0x7708280d in KERNELBASE!DeleteAce () from
C:\Windows\syswow64\KernelBase.dll
#1  0x010fd40c in w32_abort () at w32fns.c:7204
#2  0x0107bb11 in row_equal_p (b=0x373e968, a=0x5d4f968,
mouse_face_p=<optimized out>) at dispnew.c:1294
#3  scrolling_window (header_line_p=0, w=0x3ae5800) at dispnew.c:4305
#4  update_window (w=0x3ae5800, force_p=1) at dispnew.c:3605
#5  0x0107bd68 in update_window_tree (w=0x3ae5800, force_p=1) at dispnew.c:3349
#6  0x0107e92f in update_frame (f=0x3ae5e00, force_p=1,
inhibit_hairy_id_p=0) at dispnew.c:3276
#7  0x01131466 in redisplay_internal () at xdisp.c:13238
#8  0x01131d82 in redisplay_preserve_echo_area (from_where=8) at xdisp.c:13389
#9  0x010315ca in detect_input_pending_run_timers (do_display=1) at
keyboard.c:10474
#10 0x0101d296 in wait_reading_process_output (time_limit=600,
microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=55470106,
wait_proc=0x0,
    just_wait_proc=0) at process.c:4701
#11 0x010802f6 in sit_for (timeout=2400, reading=1, do_display=1) at
dispnew.c:5994
#12 0x01033f82 in read_char (commandflag=1, nmaps=2, maps=0x88fae0,
prev_event=55470106, used_mouse_menu=0x88fbd8, end_time=0x0) at
keyboard.c:2687
#13 0x0103576d in read_key_sequence (keybuf=0x88fc48, prompt=55470106,
dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1,
    bufsize=30) at keyboard.c:9290
#14 0x01037cf9 in command_loop_1 () at keyboard.c:1447
#15 0x0101183b in internal_condition_case (bfun=0x1037aa0
<command_loop_1>, handlers=55527834, hfun=0x102a870 <cmd_error>) at
eval.c:1499
#16 0x01028c2d in command_loop_2 (ignore=55470106) at keyboard.c:1158
#17 0x01011779 in internal_catch (tag=55525858, func=0x1028c00
<command_loop_2>, arg=55470106) at eval.c:1256
#18 0x0102a230 in command_loop () at keyboard.c:1137
#19 recursive_edit_1 () at keyboard.c:757
#20 0x0102a5a5 in Frecursive_edit () at keyboard.c:821
#21 0x01258e57 in main (argc=<optimized out>, argv=0x9b2cc0) at emacs.c:1707
(gdb) frame 2
#2  0x0107bb11 in row_equal_p (b=0x373e968, a=0x5d4f968,
mouse_face_p=<optimized out>) at dispnew.c:1294
1294      xassert (verify_row_hash (a));
(gdb) p a->enabled_p
$1 = 1
(gdb) p b->enabled_p
$2 = 1
(gdb) prowx a
y=210 x=0 pwid=128 a+d=12+3=15 phys=12+3=15 vis=15  L=0 T=16 R=0
start=60162 end=60178 ENA DISP
(gdb) prowx b
y=210 x=0 pwid=128 a+d=12+3=15 phys=12+3=15 vis=15  L=0 T=16 R=0
start=60162 end=60178 ENA DISP
(gdb) pgrowx a
TEXT: 16 glyphs
  0    0: CHAR[S] pos=57996 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  1    8: CHAR[l] pos=57997 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  2   16: CHAR[o] pos=57998 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  3   24: CHAR[t] pos=57999 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  4   32: CHAR[ ] pos=58000 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  5   40: CHAR[i] pos=58001 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  6   48: CHAR[s] pos=58002 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  7   56: CHAR[ ] pos=58003 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  8   64: CHAR[t] pos=58004 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
  9   72: CHAR[h] pos=58005 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
 10   80: CHAR[e] pos=58006 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
 11   88: CHAR[ ] pos=58007 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
 12   96: CHAR[n] pos=58008 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
 13  104: CHAR[a] pos=58009 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
 14  112: CHAR[m] pos=58010 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
 15  120: CHAR[e] pos=58011 blev=0,btyp=L w=8 a+d=12+3 face=39 MB
(gdb) pgrowx b
TEXT: 16 glyphs
  0    0: CHAR[ ] pos=60162 blev=0,btyp=L w=8 a+d=12+3 MB
  1    8: CHAR[ ] pos=60163 blev=0,btyp=L w=8 a+d=12+3 MB
  2   16: CHAR[ ] pos=60164 blev=0,btyp=L w=8 a+d=12+3 MB
  3   24: CHAR[ ] pos=60165 blev=0,btyp=L w=8 a+d=12+3 MB
  4   32: CHAR[(] pos=60166 blev=0,btyp=L w=8 a+d=12+3 MB
  5   40: CHAR[i] pos=60167 blev=0,btyp=L w=8 a+d=12+3 face=26 MB
  6   48: CHAR[f] pos=60168 blev=0,btyp=L w=8 a+d=12+3 face=26 MB
  7   56: CHAR[ ] pos=60169 blev=0,btyp=L w=8 a+d=12+3 MB
  8   64: CHAR[(] pos=60170 blev=0,btyp=L w=8 a+d=12+3 MB
  9   72: CHAR[n] pos=60171 blev=0,btyp=L w=8 a+d=12+3 MB
 10   80: CHAR[o] pos=60172 blev=0,btyp=L w=8 a+d=12+3 MB
 11   88: CHAR[t] pos=60173 blev=0,btyp=L w=8 a+d=12+3 MB
 12   96: CHAR[ ] pos=60174 blev=0,btyp=L w=8 a+d=12+3 MB
 13  104: CHAR[c] pos=60175 blev=0,btyp=L w=8 a+d=12+3 MB
 14  112: CHAR[)] pos=60176 blev=0,btyp=L w=8 a+d=12+3 MB
 15  120: CHAR[ ] pos=0 blev=0,btyp=B w=8 a+d=12+3 MB
(gdb) p a->hash
$3 = 127343105
(gdb) p b->hash
$4 = 127343105
(gdb)