From owner-freebsd-bugs Fri Jun 23 22:25:09 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA12352 for bugs-outgoing; Fri, 23 Jun 1995 22:25:09 -0700 Received: from blob.best.net (blob.best.net [204.156.128.88]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id WAA12344 for ; Fri, 23 Jun 1995 22:25:07 -0700 Received: from shell1.best.com (shell1.best.com [204.156.128.10]) by blob.best.net (8.6.12/8.6.5) with ESMTP id WAA07484; Fri, 23 Jun 1995 22:24:05 -0700 Received: (dillon@localhost) by shell1.best.com (8.6.12/8.6.5) id WAA26119; Fri, 23 Jun 1995 22:23:44 -0700 Date: Fri, 23 Jun 1995 22:23:44 -0700 From: Matt Dillon Message-Id: <199506240523.WAA26119@shell1.best.com> To: Bruce Evans Cc: bugs@FreeBSD.org Subject: Re: connect() bug found and fixed (uninitialized pointer) Sender: bugs-owner@FreeBSD.org Precedence: bulk :> couple of other programs. As best as I can tell, :> something gets confused and the parameter offsets :> get skewed, causing corruption when a bad pointer :> (due to the skew) is dereferenced. : :Runtime problems are most likely caused by %d or %ld format specifiers :mismatched with quad_t arguments, e.g., off_t's. quad_t's should be :printed in format %qd. Casts shouldn't normally be used except for :pointers. Pointer types should be cast to (void *) and printed in :format %p. -Wall finds most mismatches to give you some chance of :detecting int vs. long mismatches but it is sloppy about pointers. : :Bruce Yes, I finally figured that out. I think there is a serious problem though, because MOST third party programs do not put -Wall in their Makefile, and without -Wall you get not a single warning about possible quad_t conflicts... everything appears to compile and link just fine, except the resulting binary does weird things. Now, for us... obviously we will be putting -Wall in everything we compile from now on, but I think you will find a lot of people having serious problems with this quad_t change... rightly, new procedure names should have been chosen for the relatively few system calls that need quad_t's (lseek, ftruncate could become lqseek, fqtruncate). You may wish to consider turning -Wall or, at least, the warning regarding unprototyped procedure calls, ON by default in gcc. Personally, I think keeping the same naming conventions was ill-considered. -Matt Matthew Dillon VP Engineering, BEST Internet Communications, Inc. , [always include a portion of the original email in any response!]