From pdp@nl.demon.net  Thu May 23 12:51:04 2002
Return-Path: <pdp@nl.demon.net>
Received: from hermes.mail.nl.demon.net (hermes.mail.nl.demon.net [194.159.72.197])
	by hub.freebsd.org (Postfix) with ESMTP id 9D1F937B41E
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 23 May 2002 12:51:03 -0700 (PDT)
Received: from samhain.noc.nl.demon.net ([194.159.72.214])
	by hermes.mail.nl.demon.net with esmtp (Exim 3.36 #1)
	id 17Ayc2-0000Oq-00
	for FreeBSD-gnats-submit@freebsd.org; Thu, 23 May 2002 21:51:02 +0200
Received: by samhain.noc.nl.demon.net with local 
	id 17Ayc2-000240-00; Thu, 23 May 2002 19:51:02 +0000
Message-Id: <E17Ayc2-000240-00@samhain.noc.nl.demon.net>
Date: Thu, 23 May 2002 19:51:02 +0000
From: Phil Pennock <pdp@nl.demon.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: less can dump core, FPU exception
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         38467
>Category:       bin
>Synopsis:       less can dump core, FPU exception
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 23 13:00:21 PDT 2002
>Closed-Date:    Mon Jul 14 04:22:30 PDT 2003
>Last-Modified:  Mon Jul 14 04:22:30 PDT 2003
>Originator:     Phil Pennock
>Release:        FreeBSD 4.5-RELEASE-p2 i386
>Organization:
Thus Plc / Demon Internet Netherlands
>Environment:
System: FreeBSD samhain.noc.nl.demon.net 4.5-RELEASE-p2 FreeBSD 4.5-RELEASE-p2 #3: Tue Apr 16 19:28:41 GMT 2002 root@samhain.noc.nl.demon.net:/usr/src/sys/compile/SAMHAIN i386
>Description:
less(1) can dump core if target line is greater than the number of lines
in a file, and the percentage through the file of the target line is
displayed in the prompt.

Same general behaviour was in OpenBSD, fixed following PR:
 <URL:http://cvs.openbsd.org/cgi-bin/wwwgnats.pl/full/1643>

However, for some unknown reason, FreeBSD doesn't dump core unless
trying as root, so perhaps a different cause.  Except that on a
4.6-PRERELEASE system, it _does_ dump core as a regular used.  And I
can't isolate any related difference in the running environment
(env, ulimits, etc).  Sorry.
>How-To-Repeat:
[become root]
# export LESS='-j5 -P%pj'
# echo foo > bar
# /usr/bin/less bar
foo
Floating point exception - core dumped
#
>Fix:
Unknown.  But perhaps similar to the fix for OpenBSD PR #1643.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Mon Jul 14 04:21:36 PDT 2003 
State-Changed-Why:  
less is maintained externally to FreeBSD. Can you please 
raise this problem with the less developers instead? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=38467 
>Unformatted:
