From owner-freebsd-bugs Mon Jun 28 16:40: 5 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id DF18015145 for ; Mon, 28 Jun 1999 16:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id QAA78927; Mon, 28 Jun 1999 16:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 900E814DD4; Mon, 28 Jun 1999 16:36:09 -0700 (PDT) Message-Id: <19990628233609.900E814DD4@hub.freebsd.org> Date: Mon, 28 Jun 1999 16:36:09 -0700 (PDT) From: genek@narus.com To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: misc/12438: Dynamic loader or vtable problem in 3.2-STABLE and 4.0-CURRENT Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12438 >Category: misc >Synopsis: Dynamic loader or vtable problem in 3.2-STABLE and 4.0-CURRENT >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 28 16:40:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Gene Kan >Release: 3.2-STABLE >Organization: Narus, Inc. >Environment: FreeBSD freebsd.narus.com 3.2-STABLE FreeBSD 3.2-STABLE #0: Mon Jun 28 07:12:41 GMT 1999 root@freebsd.narus.com:/usr/src/sys/compile/FREEBSD i386 >Description: Non-unique names across multiple shared objects loaded by dlopen are not uniquely-referenceable in C++. It seems to work fine in C. >How-To-Repeat: liba.so contains class A : public baseclass. libb.so contains class B : public baseclass. Both shared objects contain a function getinterface() which returns a new instance of baseclass appropriate to that .so. Class A and B implement some method of baseclass. Load liba.so and libb.so using dlopen. Instantiate objects of A and B. a->function(); b->function(); You will find that both calls do the same thing, that is whatever the first-loaded .so specified. Dynamic-object-local namespaces under C++ are properly implemented in Solaris and Linux, but fail for some reason in FreeBSD. >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message