Subject: pkg/5041: rc in package source drops core when saying "limit" or "limit -h"
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/23/1998 17:21:41
>Number:         5041
>Category:       pkg
>Synopsis:       long data type treated as int in fprint in builtins.c for limit command
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 23 08:35:00 1998
>Originator:     Sean Doran
Sean Doran <>
Development Manager, Ebone Inc., Copenhagen Denmark
>Release:        NetBSD-current Feb 21 1998 tar balls
System: NetBSD 1.3D NetBSD 1.3D (EBONE) #0: Sun Feb 22 21:41:16 CET 1998 i386

	Running the "limit" builtin command causes a core dump
        immediately upon printing the first numerical limit.

        Note that "make trip" in the package work directory fails
        because of this.
	run rc in an environment where e.g. datasize is a non-infinite value
	type "limit"
	type return
	workaround: don't type "limit" or "limit -h" without a value
        workaround ii: cast lim arg to int type in builtin.c:printlimit()
		       fprint call in line 495
                       (this generally gives you ok output
			from the limit builtin command and
			causes "make trip" to work)
        fix: clean up disgusting grot in print.c to allow for a %l
	     type, and change the fprint call in builtins.c:printlimit()
             to use %l instead of %d.
        the latest rc stuff may already have a fix?