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 342E6BBAF for ; Fri, 2 Jul 2010 10:08:05 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYDALY7LUzB/Bd4fGdsb2JhbACDHJxPFQEBCwkKBxEFH4gfpDWRCYEqgwlyBIgz X-IronPort-AV: E=Sophos;i="4.53,525,1272837600"; d="scan'208";a="54362222" Received: from smtp-msa-out01.orange.fr ([193.252.23.120]) by mail2-smtp-roc.national.inria.fr with ESMTP; 02 Jul 2010 10:07:47 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 4DFDE1C001E1; Fri, 2 Jul 2010 10:07:46 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id 3DD091C003E9; Fri, 2 Jul 2010 10:07:46 +0200 (CEST) Received: from [192.168.1.90] (APuteaux-154-1-37-200.w83-199.abo.wanadoo.fr [83.199.52.200]) by mwinf5a03.orange.fr (SMTP Server) with ESMTP id F35D91C001E1; Fri, 2 Jul 2010 10:07:45 +0200 (CEST) X-ME-UUID: 20100702080745996.F35D91C001E1@mwinf5a03.orange.fr X-ME-User-Auth: lexifi Message-ID: <4C2D9E51.8010500@frisch.fr> Date: Fri, 02 Jul 2010 10:07:45 +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: 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 bug:01 cmx:01 cmx:01 segfault:01 bug:01 ocamlc:01 ocamlopt:01 -for-pack:01 -pack:01 dynlink:01 dynlink:01 4231:98 wrote:01 On 07/01/2010 09:16 PM, Daniel Bünzli wrote: > Well in fact this looks like dll bug since if the interface of M.test > doesn't match in a/m.cmx and b/m.cmx then a segfault occurs. Something > similar is reported here : > > http://caml.inria.fr/mantis/view.php?id=4839 > http://caml.inria.fr/mantis/view.php?id=4229 > > Is there any fix expected for the final 3.12 ? As this makes plugins > quite an unreliable feature (if you expect your plugins to come from > different sources). Another related bug: http://caml.inria.fr/mantis/view.php?id=4231 This one shows that the same problem (linking modules with the same name several times, but different implementations, thus breaking the type system) can appear in the following situations: - Static linking with ocamlc (no check at all that two modules with the same name are not linked together). - Static linking with ocamlopt (there is a check that the global symbols corresponding to module themselves are unique; but it can be broken with -for-pack and -pack). So the problem is more general than dynlink. (Note: for dynlink, I believe that loading modules in private mode should be safe.) Alain