Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jul 1999 03:01:31 -0400 (EDT)
From:      Alexander Litvin <archer@lucky.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/12801: nvi infinite recursion with options "leftright" and "comment"
Message-ID:  <199907250701.DAA89825@unknown.nowhere.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907250701.DAA89825>