From owner-freebsd-current Mon Dec 21 01:11:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA26454 for freebsd-current-outgoing; Mon, 21 Dec 1998 01:11:31 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles336.castles.com [208.214.167.36]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA26448 for ; Mon, 21 Dec 1998 01:11:29 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id BAA51022; Mon, 21 Dec 1998 01:08:54 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199812210908.BAA51022@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: sthaug@nethelp.no cc: mike@smith.net.au, dcs@newsguy.com, current@FreeBSD.ORG Subject: Re: BootFORTH - demo floppy In-reply-to: Your message of "Mon, 21 Dec 1998 10:06:28 +0100." <13401.914231188@verdi.nethelp.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Dec 1998 01:08:54 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > > We don't like counted strings. They suck for innumerable reasons, and > > > > if the only reason for having them there is "tradition" (ie. there is > > > > no reason *not* to take them away) then they can damn well die. 8) > > > > > > Given the many buffer overflows that have been found in various Unix > > > applications through the years, and the recent cleanup of string handling > > > in the kernel, maybe this view should be reexamined? > > > > *groan* > > > > Counted strings aren't somehow magically immune to overflowing their > > buffers. Lousy programming technique will take you from behind no > > matter what technology you think you're using. > > Of course. But counted strings can make some buffer overflow issues > more visible, and may get the programmer to *think* about this. > > As an example, qmail uses a library which reimplements a good bit of > the string handling in stdio, using counted strings. > > If counted strings suck for innumerable reasons, are these reasons > documented somewhere? Commonsense suggests the two major problems: - the count is usually too small (in the ANS Forth case, it's one byte) - the overhead for maintaining the count and working with it is often unconsionably high, ie. the tradeoffs aren't actually very good. This is something you usually learn when you try to do something useful with Pascal as a junior weenie. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message