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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 5960F7FACB for ; Sat, 6 Sep 2014 00:07:17 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.216.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.216.46 as permitted sender) identity=mailfrom; client-ip=209.85.216.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qa0-f46.google.com) identity=helo; client-ip=209.85.216.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-qa0-f46.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoBANMzClTRVdgulGdsb2JhbABag2BXBIJ4xhiHTAGBAAgWEAEBAQEHCwsJEiuEAwEBAQMBEhEdARsdAQMBCwYFBAcNKgICIgERAQUBHAYTIogLAQMJCA2dYmuLK4FygxCJCQoZJw1mhXQBEQEBBA6OaFMEB4J5gVMFjymGRYZ+kzQYKYUuIS+BB4FIAQEB X-IPAS-Result: ApoBANMzClTRVdgulGdsb2JhbABag2BXBIJ4xhiHTAGBAAgWEAEBAQEHCwsJEiuEAwEBAQMBEhEdARsdAQMBCwYFBAcNKgICIgERAQUBHAYTIogLAQMJCA2dYmuLK4FygxCJCQoZJw1mhXQBEQEBBA6OaFMEB4J5gVMFjymGRYZ+kzQYKYUuIS+BB4FIAQEB X-IronPort-AV: E=Sophos;i="5.04,475,1406584800"; d="scan'208";a="93256412" Received: from mail-qa0-f46.google.com ([209.85.216.46]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 06 Sep 2014 00:07:16 +0200 Received: by mail-qa0-f46.google.com with SMTP id w8so11558418qac.19 for ; Fri, 05 Sep 2014 15:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=uHDCzsSV5OsZcgadGH3hf5JW+UviBf7y3QI1i+EhvUg=; b=WxhU52eb4Lb/QS0s4U+mbe+zw5Jcd0a4UehinWiW7xQoOSjwWKUZJHYtg1Ds1Mz7lf kwD23RWPRSzOGU+RMrUlAyGO+rDBe71sntNMUvYiOMkNj1hFtulQh39Jl0Q6e+7KZrA2 +Vtd+v86bI6lOYZYiSvWR8OEMJMazKtYy+Y8ZwgxNlUP0n9WAIH1m5n3FV8qfRYdTvQS 1pJ1LinWg9ZG85G7laJW5SVUxJpnOcNCqV4odHDAyE+m+86SR9z/jScRJPWkcbJoJT39 nY7EY5xKQUs4xGIyO072myEKgbih3JcRCzADEcPlfkw9F63lGdN+q886KgjUOXN5//hk dnBQ== X-Received: by 10.140.82.71 with SMTP id g65mr21640947qgd.75.1409954835513; Fri, 05 Sep 2014 15:07:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.138.15 with HTTP; Fri, 5 Sep 2014 15:06:55 -0700 (PDT) In-Reply-To: <20140905215626.GB3416@annexia.org> References: <20140905215626.GB3416@annexia.org> From: Ashish Agarwal Date: Fri, 5 Sep 2014 18:06:55 -0400 Message-ID: To: "Richard W.M. Jones" Cc: Caml List Content-Type: multipart/alternative; boundary=001a11c1169a1ec823050258b137 Subject: Re: [Caml-list] segfault in simple program with 4.02 native --001a11c1169a1ec823050258b137 Content-Type: text/plain; charset=UTF-8 I increased the stack size to 65532, which is apparently the max allowed on a Mac, and it doesn't change the behavior. On Fri, Sep 5, 2014 at 5:56 PM, Richard W.M. Jones wrote: > 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 > --001a11c1169a1ec823050258b137 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I increased the stack size to 65532, which is apparently t= he max allowed on a Mac, and it doesn't change the behavior.


On Fri, Sep 5, 201= 4 at 5:56 PM, Richard W.M. Jones <rich@annexia.org> wrote:
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 wi= th 4.01.
>
> This is the minimal example I could come up with. It uses atdgen and i= s
> sensitive to the exact fields in the .atd file. Removing any of the fi= elds
> 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. Inst= ead
> 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.=C2=A0 So instead I have a suggestion:

What happens if you increase the stack limit?

Rich.

--
Richard Jones
Red Hat

--001a11c1169a1ec823050258b137--