Mail Archives: cygwin/2005/08/21/04:07:41
Igor Pechtchanski wrote:
> I forgot to mention that explicitly sending SIGWINCH (using "kill -WINCH")
> doesn't trigger the problem. Also, this doesn't seem to happen when
> changing the width/height of the window by 1-2 lines/columns, only when
> the window is resized by larger amounts (5-10 lines/columns). Either
> height or width resizing triggers this.
It happens here too. It looks like it's happening in the signal handler:
Program received signal SIGSEGV, Segmentation fault.
[Switching to thread 12028.0x30d4]
0x00401b71 in display_update_one_window (win=0x1005d200) at ../../info/display.c:308
(gdb) bt
#0 0x00401b71 in display_update_one_window (win=0x1005d200) at ../../info/display.c:308
#1 0x00401f53 in display_update_display (window=0x1005d200) at ../../info/display.c:85
#2 0x004146e8 in reset_info_window_sizes () at ../../info/signals.c:161
#3 0x004147ef in info_signal_proc (sig=28) at ../../info/signals.c:277
#4 0x610883dc in _sigbe () at ../../../../src/winsup/cygwin/cygserver.h:82
#5 0x00000000 in ?? () from
gdb) list 290,310
290 }
291
292 /* We have the exact line as it should appear on the screen.
293 Check to see if this line matches the one already appearing
294 on the screen. */
295 entry = display[line_index + win->first_row];
296
297 /* If the screen line is inversed, then we have to clear
298 the line from the screen first. Why, I don't know.
299 (But don't do this if we have no visible entries, as can
300 happen if the window is shrunk very small.) */
301 if ((entry && entry->inverse)
302 /* Need to erase the line if it has escape sequences. */
303 || (raw_escapes_p && strchr (entry->text, '\033') != 0))
304 {
305 terminal_goto_xy (0, line_index + win->first_row);
306 terminal_clear_to_eol ();
307 entry->inverse = 0;
308 entry->text[0] = '\0';
309 entry->textlen = 0;
310 }
(gdb) p line_index
$7 = 6
(gdb) p win->first_row
$8 = 0
(gdb) p entry
$9 = (DISPLAY_LINE *) 0x1005d518
(gdb) p *entry
$10 = {text = 0x636c6557 <Address 0x636c6557 out of bounds>, textlen = 543518063, inverse
= 0}
It seems that the display[] array is getting somehow clobbered. The exact spot of the
fault seems to vary, I've seen it die on line 301 also where entry is an invalid (but not
null) pointer and trying to reference entry->inverse causes the fault. display seems to
be an alias for a global variable the_display. <wild guess mode> Do you suppose that
somehow the signal handler is being called twice recursively? Or called at a point where
the_display is at an invalid state? </wild guess mode>
Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -