From owner-freebsd-current Thu Sep 3 17:05:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA21919 for freebsd-current-outgoing; Thu, 3 Sep 1998 17:05:11 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.6.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA21904 for ; Thu, 3 Sep 1998 17:05:05 -0700 (PDT) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.8/8.8.8) id RAA14321; Thu, 3 Sep 1998 17:04:00 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp04.primenet.com, id smtpd014286; Thu Sep 3 17:03:53 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id RAA06884; Thu, 3 Sep 1998 17:03:49 -0700 (MST) From: Terry Lambert Message-Id: <199809040003.RAA06884@usr09.primenet.com> Subject: Re: Standardizing a BSD/ELF ABI... To: cracauer@cons.org (Martin Cracauer) Date: Fri, 4 Sep 1998 00:03:49 +0000 (GMT) Cc: tlambert@primenet.com, freebsd-current@FreeBSD.ORG In-Reply-To: <19980903122603.A24806@cons.org> from "Martin Cracauer" at Sep 3, 98 12:26:03 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I didn't see anyone posting a piece of code to show the problem, maybe > I overlooked something? Your program is: main() { extern char foo[]; initme(); /* get from shared library*/ /* override default initilization from library*/ strcpy( foo, "up to 16 bytes"); } Link it against a library with a foo of size 16, and then run it with a (newer) library with a foo of size 4. If the data is from the library, then based on a sizeof(foo) == 16, where are the extra 12 'X' characters going? The shared library is insufficient to meet the relink clause of the GPL. Now your program is: main() { initme(); /* get from shared library*/ } If the data is from the image instead of the library, then link it against a library with a foo of size 4, and then run it with a (newer) library with a foo of size 16. The shared library is insufficient to meet the relink clause of the GPL. Either place the data goes, I can create a case which will result in a buffer overrun. This is the problem with data interfaces rather than procedural interfaces. This is why you have to rebuild libkvm and rebuild (rather than relink) "ps" when you change the proc structure in FreeBSD: the failure of data interfaces to procedurally abstract data access. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message