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 D5DB5BC88 for ; Tue, 8 Feb 2005 18:51:48 +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 j18HpmAd020853 for ; Tue, 8 Feb 2005 18:51:48 +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 SAA32341 for ; Tue, 8 Feb 2005 18:51:48 +0100 (MET) Received: from [IPv6:::1] (yquem.inria.fr [128.93.8.37]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j18Hpjei018999 for ; Tue, 8 Feb 2005 18:51:47 +0100 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: <42062429.4050404@noos.fr> References: <42062429.4050404@noos.fr> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <1A8E9A39-79FA-11D9-BE0B-000D9345235C@inria.fr> Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] Segfault using malloc within stubs Date: Tue, 8 Feb 2005 18:51:47 +0100 To: caml users X-Mailer: Apple Mail (2.619) X-Miltered: at concorde with ID 4208FC34.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4208FC31.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 segfault:01 malloc:01 stubs:01 wrote:01 pointer:01 malloc:01 pointer:01 bug:01 julius:98 doligez:01 doligez:01 caml:02 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 Feb 6, 2005, at 15:05, 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 :) Except for the "CAML" macro that doesn't exist and the uninitialized value of the "result" variable, your code is correct. The bug must be within the part that you removed. -- Damien