From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA15131; Fri, 16 Apr 2004 18:53:07 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA17208 for ; Fri, 16 Apr 2004 18:53:06 +0200 (MET DST) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3GGs9jq022719 for ; Fri, 16 Apr 2004 18:54:09 +0200 Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1BEWaL-0007g5-00 for ; Fri, 16 Apr 2004 17:53:01 +0100 Date: Fri, 16 Apr 2004 17:53:01 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Dynlink and unsafe modules Message-ID: <20040416165301.GB29465@redhat.com> References: <407FFA81.7000307@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <407FFA81.7000307@yahoo.it> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 dynlink:01 2004:99 dynlink:01 loadfile:01 -unsafe:01 footprints:01 giants:99 ltd:98 unsafe:01 unsafe:01 command:98 0200,:01 checking:01 exception:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Apr 16, 2004 at 05:23:45PM +0200, Luca Pascali wrote: > Now calling the Dynlink.loadfile function on the library filename (after > the Dynlink.init ()) I get the following exception: > Dynlink.Error("this object file uses unsafe features") This simply means that the library or module you are trying to load does some unsafe stuff - typically it was compiled with the "-unsafe" option to turn off bounds checking, or else it contains C code. Try using the ocamlobjinfo (sometimes called objinfo) command to display the internal structure of the library / module that you are trying to load. > I tried also to call the Dynlink.allow_unsafe_modules true function to > bypass the problem that rises the exception. > What I got is that I didn't get this exception, but I got troubles with > a simple function in witch I use the stat of Unix in a try ... with ... > clause. > This try/with failed to recognise the Unix.Error (Unix.NOENT,_) execption. > If I do not call the Dynlink.allow_unsafe_modules true function, this > try/with does not fails. Can you post a test case where this fails? Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment If I have not seen as far as others, it is because I have been standing in the footprints of giants. -- from Usenet ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners