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 E16717FACB for ; Fri, 5 Sep 2014 23:56:28 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of rich@annexia.org) identity=pra; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of rich@annexia.org designates 80.68.91.176 as permitted sender) identity=mailfrom; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="rich@annexia.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@furbychan.cocan.org) identity=helo; client-ip=80.68.91.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="rich@annexia.org"; x-sender="postmaster@furbychan.cocan.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlcLAM0wClRQRFuw/2dsb2JhbABagw1TsEYFAQECAgUBbwGYIodMAYEIFneEBAEFOj8QCxgJExIPBSghiFkBCL8xARMEhXwviEtXB4MvgR0FjymCFYQwhn2VJ4NiPIE2gUgBAQE X-IPAS-Result: AlcLAM0wClRQRFuw/2dsb2JhbABagw1TsEYFAQECAgUBbwGYIodMAYEIFneEBAEFOj8QCxgJExIPBSghiFkBCL8xARMEhXwviEtXB4MvgR0FjymCFYQwhn2VJ4NiPIE2gUgBAQE X-IronPort-AV: E=Sophos;i="5.04,475,1406584800"; d="scan'208";a="77932429" Received: from furbychan.cocan.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 05 Sep 2014 23:56:28 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.80) (envelope-from ) id 1XQ1UY-0003MP-Ty; Fri, 05 Sep 2014 22:56:26 +0100 Date: Fri, 5 Sep 2014 22:56:26 +0100 From: "Richard W.M. Jones" To: Ashish Agarwal Cc: Caml List Message-ID: <20140905215626.GB3416@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] segfault in simple program with 4.02 native On Fri, Sep 05, 2014 at 05:33:11PM -0400, Ashish Agarwal wrote: > https://github.com/agarwal/ocaml402_error > > The above link contains a simple program that segfaults when compiling with > ocamlopt 4.02. Byte code doesn't segfault, nor does native code with 4.01. > > This is the minimal example I could come up with. It uses atdgen and is > sensitive to the exact fields in the .atd file. Removing any of the fields > leads to correctly functioning code. > > I've only tested on Mac OS X so far. > > In the context of my full code, I observed another behavior also. Instead > of a segfault, I would get random non-ascii characters printed for the > value of postgres.host, and it would be different on repeated runs of the > program (I didn't even recompile in between). I can't seem to reproduce > this behavior, only getting the segfault now. I made a best effort to compile that, but I don't have some of the gazillion dependencies. So instead I have a suggestion: What happens if you increase the stack limit? Rich. -- Richard Jones Red Hat