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 JAA06058; Fri, 12 Apr 2002 09:39:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA11301 for ; Fri, 12 Apr 2002 09:39:22 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3C7dJL19585; Fri, 12 Apr 2002 09:39:19 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA11282; Fri, 12 Apr 2002 09:39:18 +0200 (MET DST) Date: Fri, 12 Apr 2002 09:39:18 +0200 From: Xavier Leroy To: Tom Buscher Cc: caml-list@inria.fr, jpolakow@gnp.com, tfoucher@gnp.com Subject: Re: [Caml-list] Hybrid ML/C programs and exceptions Message-ID: <20020412093918.A5718@pauillac.inria.fr> References: <200204112133.OAA05135@gnp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200204112133.OAA05135@gnp.com>; from tbuscher@gnp.com on Thu, Apr 11, 2002 at 02:34:38PM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 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