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 MAA12702; Thu, 12 Sep 2002 12:09:59 +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 MAA12572 for ; Thu, 12 Sep 2002 12:09:58 +0200 (MET DST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g8CA9v107939 for ; Thu, 12 Sep 2002 12:09:57 +0200 (MET DST) Received: from akasha.ijm.jussieu.fr (akasha.ijm.jussieu.fr [134.157.173.57]) by shiva.jussieu.fr (8.12.5/jtpda-5.4) with ESMTP id g8CA9tjR080778 ; Thu, 12 Sep 2002 12:09:55 +0200 (CEST) Received: by akasha.ijm.jussieu.fr (Postfix, from userid 11004) id 556E23C9E1; Thu, 12 Sep 2002 12:09:48 +0200 (CEST) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15744.26604.455603.844746@akasha.ijm.jussieu.fr> Date: Thu, 12 Sep 2002 12:09:48 +0200 To: "Yaron M. Minsky" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Debugging mixed ocaml/C code In-Reply-To: <3D7FF8BA.6080508@cs.cornell.edu> References: <3D7FF8BA.6080508@cs.cornell.edu> X-Mailer: VM 7.07 under Emacs 20.7.1 X-Antivirus: scanned by sophie at shiva.jussieu.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Yaron M. Minsky [Wednesday 11 September 2002] : > Instead, it segfaults in a predictable place in the ocaml code > instead. (Surprisingly, it segfaults in the same place if I compile to > native code or bytecode.) Why is it surprising ? It probably means your C stub returns a non-block value and caml thinks it's a block value (and when it tries to access the block, it gets a segfault). Or it could be a block that was allocated with a wrong size, etc. You could use a generic function (using Obj) to print the actual structure of the returned value (block/long, nb of fields, tag, etc). -- Olivier ------------------- 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