From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id F01DBBC88 for ; Tue, 8 Feb 2005 19:07:57 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j18I7vad022994 for ; Tue, 8 Feb 2005 19:07:57 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA32155 for ; Tue, 8 Feb 2005 19:07:57 +0100 (MET) Received: from mail22.sea5.speakeasy.net (mail22.sea5.speakeasy.net [69.17.117.24]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j18I7sxr020729 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 8 Feb 2005 19:07:56 +0100 Received: (qmail 10663 invoked from network); 8 Feb 2005 18:07:53 -0000 Received: from dsl081-145-152.chi1.dsl.speakeasy.net (HELO firebird) ([64.81.145.152]) (envelope-sender ) by mail22.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 8 Feb 2005 18:07:53 -0000 Date: Tue, 8 Feb 2005 12:42:55 -0600 From: art yerkes To: julius Cc: caml-list@inria.fr Subject: Re: [Caml-list] Segfault using malloc within stubs Message-Id: <20050208124255.6d90017c.ayerkes@speakeasy.net> In-Reply-To: <42062429.4050404@noos.fr> References: <42062429.4050404@noos.fr> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4208FFFD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4208FFFA.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 segfault:01 malloc:01 stubs:01 wrote:01 pointer:01 malloc:01 pointer:01 segfault:01 swig:01 swig:01 julius:98 julius:98 ...:98 speakeasy:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Sun, 06 Feb 2005 15:05:29 +0100 julius wrote: > Actually, this is just un exemple that illustrates the real function I > used. We can add some use of the test pointer and result value but it > changes nothing: in this function you can't do anything that someway > malloc the test pointer. > As you say it's very weird and much disapointing :) > > Julius > > PS: In my implementation, test is given to a function that use it to > stock its result (after malloc it), and result is a caml value pointing > to some calculus result. The end is same: segfault... > If you like, you can give SWIG a chance to create this interface for you. try http://www.swig.org/ -- Here's a simple experiment. Stand on a train track between two locomotives which are pushing on you with equal force in opposite directions. You will exhibit no net motion. None the less, you may soon begin to notice that something important is happening. -- Robert Stirniman