Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Uncaught Unix_error.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-06-18 (13:27)
From: Romain Beauxis <toots@r...>
Subject: Re: [Caml-list] Uncaught Unix_error.
Le jeudi 18 juin 2009 15:17:12, Stéphane Glondu a écrit :
> > We believe that the issue is raised because the module that uses
> > is compiled with one of unix or threads and the application
> > using that module with the other one.
> Such errors can also happen if you link the (same) Unix module twice:
> the exceptions raised by the first instance are not catchable by
> anything linked after the second instance. This can happen quite easily,
> especially if you use Dynlink. In general, having two modules with the
> same name in one application is a bad idea.

Yes. However, when using external modules, it is probably not always possible 
to restrict this since two dependencies may have been compiled against modules 
with the same name.

It should be possible to mitigate this by making the exn value non-global in 
the C code. It do not think it will have strong consequences in term of 
runtime efficiency.