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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id A84447EC41 for ; Fri, 19 Oct 2012 04:20:59 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oleg@okmij.org) identity=pra; client-ip=66.39.3.115; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of oleg@okmij.org designates 66.39.3.115 as permitted sender) identity=mailfrom; client-ip=66.39.3.115; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@www1.g3.pair.com) identity=helo; client-ip=66.39.3.115; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="postmaster@www1.g3.pair.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiIBANK3gFBCJwNzgWdsb2JhbABFwQABAQsHBAsHFCeCJ3kbNGkUiAm9X453gyMDlWoBkyM X-IronPort-AV: E=Sophos;i="4.80,610,1344204000"; d="scan'208";a="177886857" Received: from www1.g3.pair.com ([66.39.3.115]) by mail1-smtp-roc.national.inria.fr with SMTP; 19 Oct 2012 04:20:58 +0200 Received: (qmail 5190 invoked by uid 9370); 19 Oct 2012 02:20:56 -0000 Date: 19 Oct 2012 02:20:56 -0000 Message-ID: <20121019022056.5189.qmail@www1.g3.pair.com> From: oleg@okmij.org To: anthony.tavener@gmail.com CC: christophe.raffalli@univ-savoie.fr, caml-list@inria.fr In-reply-to: X-Validation-by: oleg@okmij.org Subject: Re: [Caml-list] Re: ocaml 3.12.1 and delimcc Many thanks to Christophe Raffalli for investigating the problem. It turns out, the problem lies in GCC, which is used to compile a small bit of C code in delimcc. As Christophe Raffalli reports, GCC versions 4.4 and 4.6 (and, I add, 4.2.1 -- the version used in FreeBSD) are not problematic. However, when GCC 4.7 compiles the C portion of delimcc, testd0opt gives a segfault. The stacks-native.c file in delimcc does rely on alloca and depends on the absence of tail-call optimization. One function is written in a way to defeat the optimization; alas, GCC may be to clever to optimize the counter-measure away. Well, C only roughly fits the role of the portable assembler. I don't have GCC 4.7 readily available and can't offer an immediate fix. It is worth playing with optimization flags, and set -O0, for instance, when compiling stacks-native.c. I'll see if I could find a pragma or other way to disable undesirable optimizations.