Date: Wed, 6 Nov 1996 07:46:13 -0800 (PST) From: fn@uidaho.edu To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1970: csh limtail() bug Message-ID: <199611061546.HAA07391@zork.hungry.com> Resent-Message-ID: <199611061550.HAA26881@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1970
>Category: bin
>Synopsis: csh limtail() bug
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 6 07:50:01 PST 1996
>Last-Modified:
>Originator: faried nawaz
>Organization:
Hungry Programmers, Inc.
>Release: FreeBSD 3.0-CURRENT i386
>Environment:
i made a brain-o and typed 'limit datasize maxproc 256' instead of
'limit maxproc 256'.
>Description:
limtail() strips off the leading 'm' when its second argument is "megabytes".
>How-To-Repeat:
% limit
cputime unlimited
filesize unlimited
datasize 65536 kbytes
stacksize 8192 kbytes
coredumpsize unlimited
memoryuse 14572 kbytes
memorylocked 4858 kbytes
maxproc 40
openfiles 64
% limit datasize maxprox 256
Bad scaling; did you mean "egabytes"?.
%
% gdb -q ./csh
(gdb) b limtail
Breakpoint 1 at 0x10293: file func.c, line 1276.
(gdb) r
Starting program: /tmp/csh/./csh
% limit datasize mblah
Breakpoint 1, limtail (cp=0x2d380, str=0xfd5f "megabytes") at func.c:1276
1276 while (*cp && *cp == *str)
(gdb) print *cp
$1 = 109
(gdb) print str
$2 = 0xfd5f "megabytes"
(gdb) list
1271 static void
1272 limtail(cp, str)
1273 Char *cp;
1274 char *str;
1275 {
1276 while (*cp && *cp == *str)
1277 cp++, str++;
1278 if (*cp)
1279 stderror(ERR_BADSCALE, str);
1280 }
(gdb) step
1277 cp++, str++;
(gdb) step
1278 if (*cp)
(gdb) print str
$3 = 0xfd60 "egabytes"
(gdb) quit
The program is running. Quit anyway (and kill it)? (y or n) y
%
>Fix:
i don't know. use rc instead of csh? :)
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611061546.HAA07391>
