From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 3703ABC37 for ; Thu, 18 Jun 2009 21:18:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsMDAMcvOkqK54gDgWdsb2JhbACYZgEBFiS5XoQIBQ X-IronPort-AV: E=Sophos;i="4.42,246,1243807200"; d="scan'208";a="31516267" Received: from rouge.crans.org ([138.231.136.3]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 18 Jun 2009 21:18:10 +0200 Received: from localhost (localhost.crans.org [127.0.0.1]) by rouge.crans.org (Postfix) with ESMTP id EF9DE8068; Thu, 18 Jun 2009 21:18:09 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at crans.org Received: from rouge.crans.org ([10.231.136.3]) by localhost (rouge.crans.org [10.231.136.3]) (amavisd-new, port 10024) with LMTP id c2x6xmLPeGut; Thu, 18 Jun 2009 21:18:09 +0200 (CEST) Received: from [138.231.35.12] (zpq-12.zpq.ens-cachan.fr [138.231.35.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rouge.crans.org (Postfix) with ESMTP id 9D2E68066; Thu, 18 Jun 2009 21:18:09 +0200 (CEST) Message-ID: <4A3A93B0.10907@glondu.net> Date: Thu, 18 Jun 2009 21:21:20 +0200 From: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: david.baelde@ens-lyon.org Cc: Romain Beauxis , caml-list@inria.fr Subject: Re: [Caml-list] Uncaught Unix_error. References: <200906181416.39314.toots@rastageeks.org> <4A3A3E58.1040300@glondu.net> <53c655920906180741m71893536he6ea5960c124dddf@mail.gmail.com> In-Reply-To: <53c655920906180741m71893536he6ea5960c124dddf@mail.gmail.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; uncaught:01 -threads:01 ocamlfind:01 ocamlfind:01 dynlink:01 dynlink:01 bug:01 runtime:01 statically:01 phane:98 steph:98 phane:98 unix:01 unix:01 exception:01 David Baelde a =C3=A9crit : > Both liquidsoap and ocaml-duppy are compiled with -threads, so they > are using the same version of Unix. Duppy is not linked against Unix, > only requires it through ocamlfind. Could it be that ocamlfind (on > some versions) links Unix twice in liquidsoap? I did not know it was > even possible (except with Dynlink). ^^^^^^^^^^^^^^^^^^^ Are you sure Dynlink is not used at all in the circumstances of the bug? > Also, note that the call to read that raises the error is from the > same module that tries to catch the exception. If Jake is right, a call to Unix.read might not be catchable even in the same module. > I'm lost, I'd like to understand when the exception is registered: at > runtime initialization? In this case, only one should ever be > registered (at least it seems easy to enforce). Or is it statically > registered somehow? The exception is registered when the module is evaluated. This can happen at program startup, or during a call to Dynlink.load_file. Note that if Unix is linked in a cmxs file and you dynload it, you will face trouble. --=20 St=C3=A9phane