From owner-freebsd-bugs Fri Oct 6 21:20:51 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id VAA09397 for bugs-outgoing; Fri, 6 Oct 1995 21:20:51 -0700 Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id VAA09382 for ; Fri, 6 Oct 1995 21:20:45 -0700 Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA17611; Sat, 7 Oct 1995 00:20:12 -0400 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Sat, 7 Oct 1995 00:20 EDT Received: from lakes (lakes [192.96.3.39]) by ponds.UUCP (8.6.11/8.6.5) with ESMTP id WAA05950; Fri, 6 Oct 1995 22:16:23 -0400 Received: (from rivers@localhost) by lakes (8.6.11/8.6.9) id WAA24461; Fri, 6 Oct 1995 22:29:46 -0400 Date: Fri, 6 Oct 1995 22:29:46 -0400 From: Thomas David Rivers Message-Id: <199510070229.WAA24461@lakes> To: dca.net!awhite@dg-rtp.dg.com, se@ZPR.Uni-Koeln.DE Subject: Re: bug with gcc 2.6.2? Cc: bugs@freebsd.org Content-Type: text Content-Length: 850 Sender: owner-bugs@freebsd.org Precedence: bulk > > Thanks for your response. Of course you are right, a null string and a > null pointer are not the same. > > However, it would be nice if the str* functions would not SIGSEV when > called with a null pointer, but rather failed more nicely. > > -aw > If the str* functions were not called so much, I'd agree. However, since they are so frequently used, I lean toward not adding the check for the NULL pointer, as it would burden most programs unnecessarilly. As evidenced by the large number of programs that do not pass NULL (and then sigsegv) to a str* program, this situation is rare... I would think a "special/debugging" C library that did this, with which a developer could build that checked this, and many other things (such as the arguments to fopen(), use of gets(), etc...) would be something worthwhile. - Dave Rivers -