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
[Caml-list] Hybrid ML/C programs and exceptions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Hybrid ML/C programs and exceptions
> We have a hybrid O'Caml/C application in which ML calls C,
> which calls ML, like this:
> The "lower" ML(3) raises an exception, which is dealt with
> by C(2) using one of the callback_exn functions. When the C
> function returns, the "upper" ML function generates a bus
> error on Solaris 8, on writing to a mutable global variable.
> We are using O'Caml 3.04 with the bytecode compiler.
> Is this program structure allowed?

Yes, it is, and if you compile with the native-code compiler ocamlopt,
it works fine.  However, you've hit a bug in the bytecode interpreter
that causes callback_exn to misbehave.  This will be fixed shortly.
Thanks for reporting the problem.

- Xavier Leroy
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: