From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id AEC82BB9A for ; Tue, 15 Nov 2005 08:13:03 +0100 (CET) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAF7D2S8027320 for ; Tue, 15 Nov 2005 08:13:03 +0100 Received: by zproxy.gmail.com with SMTP id x3so1561625nzd for ; Mon, 14 Nov 2005 23:13:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JuxuXaSjpmU4Y/OLRq11ttqd8UVYXYgevvmZSu2jSlkSx3n8GlwJ6PyM85O3AQj6as8mlSaPlQuoj0hOatJG0zdLiL1MWbsEvF+GyUpVGbTvxBphQGPovLJZ89SLZ5BEEyRvPNDzxhEPNQd4B4jpbu9SFAeX+5gCfgFE4DS9DOk= Received: by 10.64.193.9 with SMTP id q9mr3884563qbf; Mon, 14 Nov 2005 23:13:02 -0800 (PST) Received: by 10.64.10.5 with HTTP; Mon, 14 Nov 2005 23:13:02 -0800 (PST) Message-ID: Date: Tue, 15 Nov 2005 20:13:02 +1300 From: Jonathan Roewen Subject: Re: [Caml-list] ocamlc -output-obj problems Cc: caml-list@yquem.inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1132028623.11813.99.camel@rosella> X-Miltered: at nez-perce with ID 43798A7E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlc:01 -output-obj:01 printf:01 gdb:01 gdb:01 alloc:01 argv:01 interprete:01 argv:01 alloc:01 ocamlc:01 -output-obj:01 funky:01 3.09.0:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > I should also note: commenting out the printf declaration, it runs fine. > Used gdb to trace where it's dying. It's in caml_copy_string(). Here's stacktrace: (gdb) run Starting program: /home/jonathan/kernel/kernel.elf Program received signal SIGSEGV, Segmentation fault. 0x0804b48d in caml_copy_string () (gdb) bt #0 0x0804b48d in caml_copy_string () #1 0x0804b54f in caml_alloc_array () #2 0x0804b595 in caml_copy_string_array () #3 0x08052cfb in caml_sys_get_argv () #4 0x080593b2 in caml_interprete () #5 0x0804a527 in caml_startup_code () #6 0x0804992b in caml_startup () #7 0x080498c6 in c_start () #8 0x080498ab in main () It makes no difference what I set argv to that I pass in. NULL makes it die in caml_alloc_array(). { 0 } doesn't work, { "" } doesn't, nor does { "", 0 }, nor does something arbitrary like { "hello", "world" [, 0] }. IMO, it sounds like ocamlc -output-obj is doing something funky it shouldn't (I'm using 3.09.0 btw). Commenting out the printf assignment thing, it runs fine .. so I'm very, very suspicious of the compiler at this stage. Jonathan