From: Romain Beauxis <toots@rastageeks.org>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Uncaught Unix_error.
Date: Fri, 19 Jun 2009 15:23:54 +0200 [thread overview]
Message-ID: <200906191523.55358.toots@rastageeks.org> (raw)
In-Reply-To: <4A3A93B0.10907@glondu.net>
Le jeudi 18 juin 2009 21:21:20, Stéphane Glondu a écrit :
> > 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.
So, if I understand it well, the C code in unixsupport.c does not match the
expected semantics of exceptions registration.
If exceptions are registered for acess through the C code, if it is assumed
that one can link against two modules that will provide exceptions in the same
namespace, and if both modules registers these exceptions dynamically, then it
should not be assumed that a global value in the C code is sufficient to get the
exception value.
Current C code says "let's get this value once and for all". This contradicts
the dynamic loading, hence should be changed to "let's get the *current* value
for this exception", this being called each time one wants to raise such an
exception...
Romain
prev parent reply other threads:[~2009-06-19 13:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 12:16 Romain Beauxis
2009-06-18 13:17 ` [Caml-list] " Stéphane Glondu
2009-06-18 13:28 ` Romain Beauxis
2009-06-18 14:41 ` David Baelde
2009-06-18 16:47 ` Jake Donham
2009-06-18 19:21 ` Stéphane Glondu
2009-06-18 20:16 ` David Baelde
2009-06-19 13:23 ` Romain Beauxis [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=200906191523.55358.toots@rastageeks.org \
--to=toots@rastageeks.org \
--cc=caml-list@yquem.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