From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4BD737FACB for ; Sat, 6 Sep 2014 00:36:26 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of edwin@etorok.net) identity=pra; client-ip=62.113.205.31; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="edwin@etorok.net"; x-sender="edwin@etorok.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of edwin@etorok.net designates 62.113.205.31 as permitted sender) identity=mailfrom; client-ip=62.113.205.31; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="edwin@etorok.net"; x-sender="edwin@etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@mx.etorok.net designates 62.113.205.31 as permitted sender) identity=helo; client-ip=62.113.205.31; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="edwin@etorok.net"; x-sender="postmaster@mx.etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhkIACY6ClQ+cc0f/2dsb2JhbABagw1TV4J8xhKHUAICAYEDFneEBAEFIx06DwsYAgIYDgICV4hfqQZ4hQiQMgERBoEsjVoUOhaCY4FTlXOcJIFnHoFeOy+CTwEBAQ X-IPAS-Result: AhkIACY6ClQ+cc0f/2dsb2JhbABagw1TV4J8xhKHUAICAYEDFneEBAEFIx06DwsYAgIYDgICV4hfqQZ4hQiQMgERBoEsjVoUOhaCY4FTlXOcJIFnHoFeOy+CTwEBAQ X-IronPort-AV: E=Sophos;i="5.04,476,1406584800"; d="scan'208";a="77934521" Received: from mx.etorok.net ([62.113.205.31]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Sep 2014 00:36:25 +0200 Received: by mx.etorok.net (OpenSMTPD) with ESMTP id 0f588fd1; for ; Sat, 6 Sep 2014 01:36:18 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=etorok.net; h= message-id:from:to:date:in-reply-to:references:content-type :mime-version:content-transfer-encoding; s=ml; l=1887; bh=jw2sx2 4AYiSPletsFfeJOWPi98Q=; b=GRHbF3Q0br5SPCvQgD0Y2IVxIjGiBq6yLXsHt4 InxSWEfO9bjr7D4RTmasHC1TfsDCzGZoIrPtwRdgtiAVAE/1PBjnjtwmsGryb81a 6zwYGXGgTU0Z1+lNNfImE5SUH81ULnzmMlJqkm3t0KID7qIxxIEkyxa2JjOt1173 kB+tU= Received: by mx.etorok.net (OpenSMTPD) with ESMTPSA id 088c80af; TLS version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO; for ; Sat, 6 Sep 2014 01:36:18 +0300 (EEST) Message-ID: <1409956580.2434.2.camel@thunder.home.lan> From: =?ISO-8859-1?Q?T=F6r=F6k?= Edwin To: caml-list@inria.fr Date: Sat, 06 Sep 2014 00:36:20 +0200 In-Reply-To: <20140905221813.GC3416@annexia.org> References: <20140905215626.GB3416@annexia.org> <20140905221302.GE3099@annexia.org> <20140905221813.GC3416@annexia.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-3.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Validation-by: edwin@etorok.net Subject: Re: [Caml-list] segfault in simple program with 4.02 native On Fri, 2014-09-05 at 23:18 +0100, Richard W.M. Jones wrote: > On Fri, Sep 05, 2014 at 11:13:02PM +0100, Richard W.M. Jones wrote: > > On Fri, Sep 05, 2014 at 06:06:55PM -0400, Ashish Agarwal wrote: > > > I increased the stack size to 65532, which is apparently the max allowed on > > > a Mac, and it doesn't change the behavior. > > > > Yup. I was able to reproduce this on the non-core version, and indeed > > increasing the stack to unlimited on Linux does not help. > > > > The stack trace is simple: > > > > #0 0x00000000004543f4 in camlPervasives__output_string_1198 () > > #1 0x0000000000472093 in camlCamlinternalFormat__output_acc_60624 () > > #2 0x0000000000473a32 in camlPrintf__fun_1062 () > > #3 0x000000000041e776 in camlApp__entry () > > #4 0x000000000041c5f9 in caml_program () > > #5 0x0000000000497f7e in caml_start_program () > > #6 0x000000000049813d in __libc_csu_init () > > #7 0x00007ffff7317d65 in __libc_start_main () from /lib64/libc.so.6 > > #8 0x000000000041c2e9 in _start () > > > > I'm just installing debuginfo so I can get more symbols .. > > .. although I guess the fact that the generated code in config_j.ml is > doing a lot of Obj.magic would be the first place to be suspicious. > > eg: > > let (x : postgres) = > { > host = Obj.magic 0.0; > ... > > where the host field has declared type string. Really? There's also this, and a lot of Obj.set_field too postgres = Obj.magic 0.0; FWIW it triggers an assertion failure with -runtime-variant d even before it starts parsing: ./app.native ### OCaml runtime: debug mode ### Initial minor heap size: 2048k bytes Initial major heap size: 3840k bytes Initial space overhead: 80% Initial max overhead: 500% Initial heap increment: 15% Initial allocation policy: 0 file memory.d.c; line 548 ### Assertion failed: Is_in_heap(fp) Best regards, --Edwin