Subject: bin/11579: vi dumps core
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wiz@danbala.tuwien.ac.at>
List: netbsd-bugs
Date: 11/27/2000 12:50:16
>Number:         11579
>Category:       bin
>Synopsis:       vi dumps core
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 27 12:50:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Wiz
>Release:        1.5K/i386-2000-11-15
>Organization:
Thomas Klausner - wiz@danbala.tuwien.ac.at
Der Horizont vieler Menschen ist ein Kreis mit Radius Null -- und
das nennen sie ihren Standpunkt. (found on /.)
>Environment:
	
System: NetBSD hiro 1.5K NetBSD 1.5K (HIRO) #0: Thu Nov 16 02:04:10 CET 2000 wiz@hiro:/archive/cvs/src/sys-i4b/arch/i386/compile/HIRO i386
Architecture: i386
Machine: i386
>Description:
vi dumps core if you edit the attached file after the error:
	Error: move: l(4294967295) c(5) o(0)
with a segfault.

The backtrace is:
#0  vs_column (sp=0x80a7000, colp=0x80a7054)
    at /archive/cvs/src/usr.bin/vi/build/../vi/vs_relative.c:45
#1  0x8089373 in vi (spp=0xbfbfd978)
    at /archive/cvs/src/usr.bin/vi/build/../vi/vi.c:114
#2  0x807047d in editor (gp=<incomplete type>, argc=1, argv=<incomplete type>)
    at /archive/cvs/src/usr.bin/vi/build/../common/main.c:450
#3  0x804b479 in main (argc=2, argv=0xbfbfda1c)
    at /archive/cvs/src/usr.bin/vi/build/../cl/cl_main.c:117
#4  0x804a435 in ___start ()

vip->sc_map in the following code segment is a null pointer:

45              *colp = (O_ISSET(sp, O_LEFTRIGHT) ?
46                  vip->sc_smap->coff : (vip->sc_smap->soff - 1) * sp->cols) +
47                  vip->sc_col - (O_ISSET(sp, O_NUMBER) ? O_NUMBER_LENGTH : 0);

Don't know enough about vi internals to find out why this happens, sorry.
>How-To-Repeat:
vi vitestfile
/man8    (that is, search for the first occurance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