From owner-freebsd-bugs Sun Jul 25 0:10:52 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 8507214D1C for ; Sun, 25 Jul 1999 00:10:48 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id AAA02188; Sun, 25 Jul 1999 00:10:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from smtp4.erols.com (smtp4.erols.com [207.172.3.237]) by hub.freebsd.org (Postfix) with ESMTP id 24F7D14BEA for ; Sun, 25 Jul 1999 00:05:20 -0700 (PDT) (envelope-from archer@lucky.net) Received: from unknown.nowhere.org (207-172-201-67.s4.as2.xnb.nj.dialup.rcn.com [207.172.201.67]) by smtp4.erols.com (8.8.8/smtp-v1) with ESMTP id DAA27229 for ; Sun, 25 Jul 1999 03:04:42 -0400 (EDT) Received: (from root@localhost) by unknown.nowhere.org (8.9.3/8.9.3) id DAA89825; Sun, 25 Jul 1999 03:01:31 -0400 (EDT) (envelope-from archer) Message-Id: <199907250701.DAA89825@unknown.nowhere.org> Date: Sun, 25 Jul 1999 03:01:31 -0400 (EDT) From: Alexander Litvin Reply-To: archer@lucky.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12801: nvi infinite recursion with options "leftright" and "comment" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12801 >Category: bin >Synopsis: nvi infinite recursion with options "leftright" and "comment" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 25 00:10:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Alexander Litvin >Release: FreeBSD 4.0-CURRENT i386 >Organization: Lucky Net ltd >Environment: FreeBSD unknown.nowhere.org 4.0-CURRENT FreeBSD 4.0-CURRENT #44: Sat Jul 24 13:46:21 EDT 1999 root@unknown.nowhere.org:/usr/src/sys/compile/UNKNOWN i386 (though the release is not relevant because the code in question seem to be unchanged since 1996) >Description: The simultanious usage of the vi editor options 'comment' (skip leading comments) and 'leftright' (do left-right scrolling) may lead to the infinite recursion: on src/contrib/nvi/vi/vs_refresh.c:626 vs_paint() function called recursively from itself. The result is that stack is exhausted and process receives segfault. >How-To-Repeat: 1. Create the ${HOME}/.exrc file with two lines: set leftright set comment or, add these lines to the existing .exrc; 2. Open any file with a few shell, C or C++ comment lines in the beginning; 3. Try to open any non-existent (new) file from the same editing session by invoking ex "edit" command. >Fix: The workaround is obviously not use 'comment' and 'leftright' options simultaniously. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message