From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id C6F35BBAF for ; Fri, 2 Jul 2010 10:40:30 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYDAMhCLUzB/Bd4fGdsb2JhbACDHJxPFQEBCwkKBxEFH6xZkQyBKoMJcgSEF4Qc X-IronPort-AV: E=Sophos;i="4.53,525,1272837600"; d="scan'208";a="54366052" Received: from smtp-msa-out01.orange.fr ([193.252.23.120]) by mail2-smtp-roc.national.inria.fr with ESMTP; 02 Jul 2010 10:40:30 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 52D931C0025F; Fri, 2 Jul 2010 10:40:30 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 3E4D11C00103; Fri, 2 Jul 2010 10:40:30 +0200 (CEST) Received: from [192.168.1.90] (APuteaux-154-1-37-200.w83-199.abo.wanadoo.fr [83.199.52.200]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id F3F541C0025F; Fri, 2 Jul 2010 10:40:29 +0200 (CEST) X-ME-UUID: 20100702084029999.F3F541C0025F@mwinf5a04.orange.fr X-ME-User-Auth: lexifi Message-ID: <4C2DA5FD.4040004@frisch.fr> Date: Fri, 02 Jul 2010 10:40:29 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= Cc: caml-list List Subject: Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations. References: <4C2D9E51.8010500@frisch.fr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; frisch:01 frisch:01 dynlink:01 dlopen:01 loadfile:01 dlopen:01 wrote:01 caml-list:01 alain:01 alain:01 modules:02 defining:02 unit:03 library:03 daniel:04 On 07/02/2010 10:27 AM, Daniel Bünzli wrote: >> (Note: for dynlink, I believe that loading modules in private mode should be safe.) > > No, at least not in 3.12.0+beta1. Ah yes, sorry, I did not ready your original post carefully enough. I think the problem is that dlopen is called (in loadfile_private mode), without RTLD_GLOBAL (but also without RTLD_LOCAL, which is never used). According to: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man3/dlopen.3.html the default is RTLD_GLOBAL under Mac OS, contrary to Linux (default is RTLD_LOCAL). I'll try to apply a fix. Alain