From owner-cvs-gnu Sun Sep 24 10:22:02 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA06154 for cvs-gnu-outgoing; Sun, 24 Sep 1995 10:22:02 -0700 Received: (from wpaul@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA06142 ; Sun, 24 Sep 1995 10:21:53 -0700 Date: Sun, 24 Sep 1995 10:21:53 -0700 From: Bill Paul Message-Id: <199509241721.KAA06142@freefall.freebsd.org> To: CVS-commiters, cvs-gnu Subject: cvs commit: src/gnu/usr.sbin/ypserv server.c Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk wpaul 95/09/24 10:21:53 Modified: gnu/usr.sbin/ypserv server.c Log: phkmalloc strikes! #ifdef out a number of calls to free() left over from the original GNU ypserv implementation. As near as I can tell, the Berkeley DB package does its own garbage collection, hence the caller doesn't have to worry about free()ing the memory returned in the DBT structures during lookups (I'm still not 1005 sure about this: the DB code is very hard to follow. I must use dynamically allocated memory since you can retreive arbitrarily large records from a database, but I'm not sure where it ends up letting go of it). This was not true with GDBM; you had to do your own garbage collection. The general rule is that if you allocate memory inside an RPC service routine, you have to free() it the next time the routine is called since the underlying XDR routines won't do it for you. But if the DB package does this itself, then we don't need to do it in the main program. Note that with the original malloc(), there were never any errors flagged. phkmalloc complained quite loudly. From owner-cvs-gnu Sun Sep 24 10:29:13 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA06333 for cvs-gnu-outgoing; Sun, 24 Sep 1995 10:29:13 -0700 Received: from tfs.com (tfs.com [140.145.250.1]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id KAA06328 ; Sun, 24 Sep 1995 10:29:09 -0700 Received: from critter.tfs.com by tfs.com (smail3.1.28.1) with SMTP id m0swurT-0003voC; Sun, 24 Sep 95 10:29 PDT Received: from localhost (localhost [127.0.0.1]) by critter.tfs.com (8.6.11/8.6.9) with SMTP id KAA00172; Sun, 24 Sep 1995 10:29:20 -0700 X-Authentication-Warning: critter.tfs.com: Host localhost didn't use HELO protocol To: Bill Paul cc: CVS-commiters@freebsd.org, cvs-gnu@freebsd.org Subject: Re: cvs commit: src/gnu/usr.sbin/ypserv server.c In-reply-to: Your message of "Sun, 24 Sep 1995 10:21:53 PDT." <199509241721.KAA06142@freefall.freebsd.org> Date: Sun, 24 Sep 1995 10:29:20 -0700 Message-ID: <170.811963760@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-cvs-gnu@freebsd.org Precedence: bulk > wpaul 95/09/24 10:21:53 > > Modified: gnu/usr.sbin/ypserv server.c > Log: > phkmalloc strikes! > > [...] > > Note that with the original malloc(), there were never any errors > flagged. phkmalloc complained quite loudly. Hmm, what was the exact complaint ? that something got freed twice ? It is not a big deal to ignore this in phkmalloc, but I though it was a bad idea to let it slip. What do people think ? -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. It will be some time yet before progress goes to far... (Poul Henningsen) From owner-cvs-gnu Sun Sep 24 10:33:12 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA06450 for cvs-gnu-outgoing; Sun, 24 Sep 1995 10:33:12 -0700 Received: from irbs.irbs.com (irbs.com [199.182.75.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id KAA06445 ; Sun, 24 Sep 1995 10:33:07 -0700 Received: (from jc@localhost) by irbs.irbs.com (8.6.12/8.6.6) id NAA03649; Sun, 24 Sep 1995 13:33:01 -0400 From: John Capo Message-Id: <199509241733.NAA03649@irbs.irbs.com> Subject: Re: cvs commit: src/gnu/usr.sbin/ypserv server.c To: wpaul@freefall.freebsd.org (Bill Paul) Date: Sun, 24 Sep 1995 13:33:01 -0400 (EDT) Cc: CVS-commiters@freefall.freebsd.org, cvs-gnu@freefall.freebsd.org In-Reply-To: <199509241721.KAA06142@freefall.freebsd.org> from "Bill Paul" at Sep 24, 95 10:21:53 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1344 Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk Bill Paul writes: > > wpaul 95/09/24 10:21:53 > > Modified: gnu/usr.sbin/ypserv server.c > Log: > phkmalloc strikes! > > #ifdef out a number of calls to free() left over from the original > GNU ypserv implementation. As near as I can tell, the Berkeley DB > package does its own garbage collection, hence the caller doesn't > have to worry about free()ing the memory returned in the DBT > structures during lookups (I'm still not 1005 sure about this: > the DB code is very hard to follow. I must use dynamically > allocated memory since you can retreive arbitrarily large records > from a database, but I'm not sure where it ends up letting go > of it). This was not true with GDBM; you had > to do your own garbage collection. > > The general rule is that if you allocate memory inside an RPC > service routine, you have to free() it the next time the routine is > called since the underlying XDR routines won't do it for you. > But if the DB package does this itself, then we don't need to do > it in the main program. > > Note that with the original malloc(), there were never any errors > flagged. phkmalloc complained quite loudly. > I have been running 48 hours with all RPC related and read_database() frees removed and I have no memory leaks. John Capo IRBS Engineering From owner-cvs-gnu Sun Sep 24 10:37:34 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA06585 for cvs-gnu-outgoing; Sun, 24 Sep 1995 10:37:34 -0700 Received: from irbs.irbs.com (irbs.com [199.182.75.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id KAA06574 ; Sun, 24 Sep 1995 10:37:28 -0700 Received: (from jc@localhost) by irbs.irbs.com (8.6.12/8.6.6) id NAA03705; Sun, 24 Sep 1995 13:37:23 -0400 From: John Capo Message-Id: <199509241737.NAA03705@irbs.irbs.com> Subject: Re: cvs commit: src/gnu/usr.sbin/ypserv server.c To: phk@critter.tfs.com (Poul-Henning Kamp) Date: Sun, 24 Sep 1995 13:37:22 -0400 (EDT) Cc: wpaul@freebsd.org, CVS-commiters@freebsd.org, cvs-gnu@freebsd.org In-Reply-To: <170.811963760@critter.tfs.com> from "Poul-Henning Kamp" at Sep 24, 95 10:29:20 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 961 Sender: owner-cvs-gnu@freebsd.org Precedence: bulk Poul-Henning Kamp writes: > > > wpaul 95/09/24 10:21:53 > > > > Modified: gnu/usr.sbin/ypserv server.c > > Log: > > phkmalloc strikes! > > > > [...] > > > > Note that with the original malloc(), there were never any errors > > flagged. phkmalloc complained quite loudly. > > Hmm, what was the exact complaint ? that something got freed twice ? > > It is not a big deal to ignore this in phkmalloc, but I though it was > a bad idea to let it slip. > There are a bunch of bogus frees in ypserv. I linked it with gnumalloc a few months back and discovered that ypserv is freeing the result of db calls. The pointers returned point within db objects. phkmalloc cores in this case. I believe I filed a GNATS report when I first discovered this months ago. I know I posted it to -current. There are other cases where ypserv frees already freed memory. The phkmalloc warnings are a Good Thing(tm). John Capo IRBS Engineering From owner-cvs-gnu Tue Sep 26 00:48:30 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id AAA22637 for cvs-gnu-outgoing; Tue, 26 Sep 1995 00:48:30 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id AAA22622 ; Tue, 26 Sep 1995 00:48:19 -0700 Date: Tue, 26 Sep 1995 00:48:19 -0700 From: David Greenman Message-Id: <199509260748.AAA22622@freefall.freebsd.org> To: CVS-commiters, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/cvs/contrib easy-import.perl Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk davidg 95/09/26 00:48:18 Branch: gnu/usr.bin/cvs/contrib RELENG_2_1_0 Modified: gnu/usr.bin/cvs/contrib easy-import.perl Log: Sync with main branch. From owner-cvs-gnu Wed Sep 27 16:14:15 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA18067 for cvs-gnu-outgoing; Wed, 27 Sep 1995 16:14:15 -0700 Received: (from nate@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA18056 ; Wed, 27 Sep 1995 16:14:10 -0700 Date: Wed, 27 Sep 1995 16:14:10 -0700 From: Nate Williams Message-Id: <199509272314.QAA18056@freefall.freebsd.org> To: CVS-commiters, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/ld/rtld rtld.c Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk nate 95/09/27 16:14:10 Modified: gnu/usr.bin/ld/rtld rtld.c Log: Fixup the "ld.so failed" message for the case when ld.so finds undefined symbols. An easy example to see this is to develop an X program which links against Xt, but doesn't add -lX11 to the link line. It will link fine, but cause run-time errors by ld.so because of missing symbols used by Xt defined in X11. This patch makes the errors more readable. Submitted by: jdp@polstra.com (John Polstra) From owner-cvs-gnu Wed Sep 27 16:17:38 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA18209 for cvs-gnu-outgoing; Wed, 27 Sep 1995 16:17:38 -0700 Received: (from nate@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id QAA18200 ; Wed, 27 Sep 1995 16:17:35 -0700 Date: Wed, 27 Sep 1995 16:17:35 -0700 From: Nate Williams Message-Id: <199509272317.QAA18200@freefall.freebsd.org> To: CVS-commiters, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/ld/rtld rtld.c Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk nate 95/09/27 16:17:34 Modified: gnu/usr.bin/ld/rtld rtld.c Log: Make the error message more readable when 'ld.so' cannot locate a needed shared library. Formerly, the message looked like this: ld.so: run: libjdp1.so.1.0: Undefined error: 0 The new message looks like this: ld.so: run: Can't find shared library "libjdp1.so.1.0" (Where "run" is the name of the program being executed.) Submitted by: jdp@polstra.com (John Polstra) From owner-cvs-gnu Wed Sep 27 23:09:44 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA05120 for cvs-gnu-outgoing; Wed, 27 Sep 1995 23:09:44 -0700 Received: from grunt.grondar.za (grunt.grondar.za [196.7.18.129]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA05112 ; Wed, 27 Sep 1995 23:09:25 -0700 Received: from grumble.grondar.za (grumble.grondar.za [196.7.18.130]) by grunt.grondar.za (8.6.12/8.6.9) with ESMTP id IAA13208; Thu, 28 Sep 1995 08:09:14 +0200 Received: from localhost (localhost [127.0.0.1]) by grumble.grondar.za (8.6.12/8.6.9) with SMTP id IAA16186; Thu, 28 Sep 1995 08:09:13 +0200 Message-Id: <199509280609.IAA16186@grumble.grondar.za> X-Authentication-Warning: grumble.grondar.za: Host localhost didn't use HELO protocol To: Nate Williams cc: CVS-commiters@freefall.freebsd.org, cvs-gnu@freefall.freebsd.org Subject: Re: cvs commit: src/gnu/usr.bin/ld/rtld rtld.c Date: Thu, 28 Sep 1995 08:09:13 +0200 From: Mark Murray Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk > nate 95/09/27 16:14:10 > > Modified: gnu/usr.bin/ld/rtld rtld.c > Log: > Fixup the "ld.so failed" message for the case when ld.so finds undefined > symbols. > > An easy example to see this is to develop an X program which links > against Xt, but doesn't add -lX11 to the link line. It will link fine, > but cause run-time errors by ld.so because of missing symbols used by Xt > defined in X11. This patch makes the errors more readable. > > Submitted by: jdp@polstra.com (John Polstra) YESSS! I have just wasted two/days of my life because of this blasted thing. I had to delve way too deep into source... Thanks guys! M -- Mark Murray 46 Harvey Rd, Claremont, Cape Town 7700, South Africa +27 21 61-3768 GMT+0200 Finger mark@grumble.grondar.za for PGP key From owner-cvs-gnu Thu Sep 28 06:26:34 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id GAA13981 for cvs-gnu-outgoing; Thu, 28 Sep 1995 06:26:34 -0700 Received: (from davidg@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id GAA13961 ; Thu, 28 Sep 1995 06:26:27 -0700 Date: Thu, 28 Sep 1995 06:26:27 -0700 From: David Greenman Message-Id: <199509281326.GAA13961@freefall.freebsd.org> To: CVS-commiters, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/ld/rtld rtld.c Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk davidg 95/09/28 06:26:27 Branch: gnu/usr.bin/ld/rtld RELENG_2_1_0 Modified: gnu/usr.bin/ld/rtld rtld.c Log: Brought in changes from revs 1.26-1.27: print better diagnostic information on failures. From owner-cvs-gnu Thu Sep 28 12:43:39 1995 Return-Path: owner-cvs-gnu Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA27264 for cvs-gnu-outgoing; Thu, 28 Sep 1995 12:43:39 -0700 Received: (from bde@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA27251 ; Thu, 28 Sep 1995 12:43:23 -0700 Date: Thu, 28 Sep 1995 12:43:23 -0700 From: Bruce Evans Message-Id: <199509281943.MAA27251@freefall.freebsd.org> To: CVS-commiters, cvs-gnu Subject: cvs commit: src/gnu/usr.bin/ld ld.c lib.c Sender: owner-cvs-gnu@FreeBSD.org Precedence: bulk bde 95/09/28 12:43:23 Modified: gnu/usr.bin/ld ld.c lib.c Log: Fix checks for open() failing. open() may successfully return 0. ld.c: Fix a an error message that said that open() failed after fopen() failed.