caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: oleg@okmij.org
To: anthony.tavener@gmail.com
Cc: christophe.raffalli@univ-savoie.fr, caml-list@inria.fr
Subject: Re: [Caml-list] Re: ocaml 3.12.1 and delimcc
Date: 19 Oct 2012 02:20:56 -0000	[thread overview]
Message-ID: <20121019022056.5189.qmail@www1.g3.pair.com> (raw)
In-Reply-To: <CAN=ouMQXqRGQAjXMA=tP8EhEDuOTs5=ZNtL9zUF1vcqAUrnTHQ@mail.gmail.com>


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.




  reply	other threads:[~2012-10-19  2:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-16  7:06 oleg
2012-10-16 14:59 ` Anthony Tavener
2012-10-19  2:20   ` oleg [this message]
2012-10-19 10:35     ` Gabriel Kerneis
2012-10-20 17:25       ` Anthony Tavener
2012-10-26  3:47       ` Anthony Tavener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121019022056.5189.qmail@www1.g3.pair.com \
    --to=oleg@okmij.org \
    --cc=anthony.tavener@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=christophe.raffalli@univ-savoie.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).