caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Dynlink and unsafe modules
Date: Fri, 16 Apr 2004 17:53:01 +0100	[thread overview]
Message-ID: <20040416165301.GB29465@redhat.com> (raw)
In-Reply-To: <407FFA81.7000307@yahoo.it>

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


      reply	other threads:[~2004-04-16 16:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16 15:23 Luca Pascali
2004-04-16 16:53 ` Richard Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040416165301.GB29465@redhat.com \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).