From owner-freebsd-bugs Sat Jul 20 16:20:03 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA23779 for bugs-outgoing; Sat, 20 Jul 1996 16:20:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA23769; Sat, 20 Jul 1996 16:20:02 -0700 (PDT) Resent-Date: Sat, 20 Jul 1996 16:20:02 -0700 (PDT) Resent-Message-Id: <199607202320.QAA23769@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, marcs@worldgate.com Received: from valis.worldgate.com (root@valis.worldgate.com [198.161.84.2]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA23623 for ; Sat, 20 Jul 1996 16:17:06 -0700 (PDT) Received: from gras-varg.worldgate.com (root@gras-varg.worldgate.com [198.161.84.12]) by valis.worldgate.com (8.6.12/8.6.12) with ESMTP id RAA28793 for ; Sat, 20 Jul 1996 17:17:05 -0600 Received: (from marcs@localhost) by gras-varg.worldgate.com (8.7.5/8.6.12) id RAA13314; Sat, 20 Jul 1996 17:17:04 -0600 (MDT) Message-Id: <199607202317.RAA13314@gras-varg.worldgate.com> Date: Sat, 20 Jul 1996 17:17:04 -0600 (MDT) From: marcs@worldgate.com Reply-To: marcs@worldgate.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1411: vi dumps core when using 'set list' Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1411 >Category: bin >Synopsis: vi dumps core when scrolling through files in 'set list' mode >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 20 16:20:01 PDT 1996 >Last-Modified: >Originator: marcs@worldgate.com >Organization: >Release: FreeBSD 2.1-STABLE i386 >Environment: 2.1.5-RELEASE; also stable for the week or two (at least) leading up to release. >Description: After doing a ':set list', when a line is just long enough so that the last character before the '$' indicating end of line would be in column 80, vi core dumps when it gets to displaying the '$' on the next line. After recompiling vi with debugging information, gdb gives me the following: $ gdb vi/common/nvi nvi.core GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.13 (i386-unknown-freebsd), Copyright 1994 Free Software Foundation, Inc... Core was generated by `nvi'. Program terminated with signal 11, Segmentation fault. Cannot access memory at address 0x76010. #0 0x312b6 in svi_line (sp=0x3f800, ep=0x45100, smp=0x869cc, yp=0x0, xp=0x0) at /usr/var/tmp/vi/common/../svi/svi_line.c:376 376 smp->c_ecsize = smp->c_eclen = KEY_LEN(sp, ch); (gdb) where #0 0x312b6 in svi_line (sp=0x3f800, ep=0x45100, smp=0x869cc, yp=0x0, xp=0x0) at /usr/var/tmp/vi/common/../svi/svi_line.c:376 #1 0x3f800 in end () #2 0x34695 in svi_sm_1up (sp=0x3f800, ep=0x45100) at /usr/var/tmp/vi/common/../svi/svi_smap.c:766 #3 0x31a12 in svi_paint (sp=0x3f800, ep=0x45100) at /usr/var/tmp/vi/common/../svi/svi_refresh.c:314 #4 0x3162c in svi_refresh (sp=0x3f800, ep=0x45100) at /usr/var/tmp/vi/common/../svi/svi_refresh.c:140 #5 0x2e2e5 in vi (sp=0x3f800, ep=0x45100) at /usr/var/tmp/vi/common/../vi/vi.c:100 #6 0x32f24 in svi_screen_edit (sp=0x3f800, ep=0x45100) at /usr/var/tmp/vi/common/../svi/svi_screen.c:225 #7 0x580c in main (argc=2, argv=0xefbfdd60) at main.c:435 The binary I'm using and the core file it generated are available upon request. I'm not sure that this is a problem involving only vi, since the vi source does not seem to have any significant changes from 2.1.0 and the problem was not present in 2.1.0 >How-To-Repeat: Using version 1.36.4.5 of sys/scsi/st.c, input the following from the keyboard: vi st.c :set list 172j12jj After the last j, vi core dumps displaying line 185. Same thing happens when scrolling via other means, but not when you go to line 185 before doing a 'set list', and then do a 'set list'. >Fix: >Audit-Trail: >Unformatted: