Subject: install/7806: sysinst segfaults with 53x21 screen size
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/18/1999 02:22:30
>Number:         7806
>Category:       install
>Synopsis:       sysinst segfaults with 53x21 screen size
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    install-manager (NetBSD system installation bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 18 02:05:01 1999
>Originator:     Tim Rightnour
>Release:        1.3I or higher

Someone trying to install netbsd on a macppc with a 53x21 character screen got
this lovely explosion with sysinst.  I'm not sure if that is too small, but it
is reproducable.  It dies trying to print the "welcome to sysinst" banner.  My
guess is that something in menuc is trying to write to a part of the screen
that doesn't exist.. but I'm not sure..

To reproduce.. just set an xterm to 53x21 (or anything around there) and run
sysinst.. it promptly core dumps.. This dump is from a libcurses.a compiled
with -g BTW.

Program received signal SIGSEGV, Segmentation fault.   
0x120012240 in makech (win=0x120186000, wy=20) at refresh.c:264
264                     csp = &curscr->lines[wy + win->begy]->line[wx +
(gdb) bt
#0  0x120012240 in makech (win=0x120186000, wy=20) at refresh.c:264
#1  0x120011e2c in wrefresh (win=0x120186000) at refresh.c:168
#2  0x120003df0 in msg_vprintf (fmt=0x12018e7c0 "", ap={__base = 0x2 <Error   
reading address 0x2: Invalid argument>,
      __offset = 0, __pad = 0}) at msg_defs.c:384
#3  0x120003edc in msg_display (msg_no=538289264) at msg_defs.c:395
#4  0x12000489c in toplevel () at /usr/src/sysinst/arch/alpha/../../main.c:126
#5  0x120000638 in menu_0_postact () at menu_defs.c:15
#6  0x120003794 in process_menu (num=0) at menu_defs.c:1546
#7  0x12000484c in main (argc=1, argv=0x1fffff3f0) at

set an xterm to 53x21 and run sysisnt.  Lose.

The correct thing to do is to bail out with "screen to small" as an error     
code.  For some reason 53x21 triggers the core dump, while most other
combinations of bizzare screen sizes do not, and result in the appropriate
error message.