caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Bob Zhang <bobzhang1988@gmail.com>
Cc: Caml List <caml-list@inria.fr>, Xavier Leroy <Xavier.Leroy@inria.fr>
Subject: Re: [Caml-list] Questions about changing lambda IR
Date: Sat, 8 Aug 2015 09:37:41 +0200	[thread overview]
Message-ID: <CAPFanBHTonhSZC+L2w2PfRc6hd2t=Kd2-V-QeOtxYtaOKMzj0A@mail.gmail.com> (raw)
In-Reply-To: <CANcqPu7JpBh_rx97Tv3ijz4EaMVuLLnghM-bduA33BBDOejoLg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1801 bytes --]

You need to run "make bootstrap" to avoid having part of the definition
compiled against the stale definition of lambda.cmi. (I just checked that
it works on your change: after a bootrsap, "make world", "make opt", "make
opt.opt" work.)

On Sat, Aug 8, 2015 at 5:50 AM, Bob Zhang <bobzhang1988@gmail.com> wrote:

>
> Dear caml develpers,
>
>    I am working on an experimental branch to pass more information from
> typedtree to lambda to enable ocaml generate user readable javascript code(
> https://github.com/bobzhang/ocaml/tree/master) (online-demo:
> http://zhanghongbo.me/js-demo/)
>
>    Here I get a segfault, after I change const_block:
>    Below is my minimal change:
>
> ```
> type pointer_info =
>   | NullConstructor of string
>   | NullVariant of string
>   | NAPointer
>
> type tag_info =
>   | Constructor of string
>   | Tuple
>   | Variant of string
>   | Record
>   | NA
>
> type structured_constant =
>     Const_base of constant
>   | Const_pointer of int * pointer_info
>   | Const_block of int * tag_info * structured_constant list
>   | Const_float_array of string list
>   | Const_immstring of string
> ```
> Note that the enriched info is not used in ``emitcode``, now I get a
> segfault in make world:
>
> ```
> ../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -c -w +33..39
> -warn-error A -bin-annot -g -safe-string -I ../../stdlib -I ../../utils -I
> ../../typing -I ../../bytecomp -I ../../asmcomp extract_crc.ml
> ../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -o extract_crc
> dynlink.cma extract_crc.cmo
> make[3]: *** [extract_crc] Segmentation fault: 11
> make[3]: *** Deleting file `extract_crc'
> make[2]: *** [otherlibraries] Error 2
> make[1]: *** [all] Error 2
> ```
>
> Any help is appreciated : )
>
> --
> Regards
> -- Hongbo Zhang
>

[-- Attachment #2: Type: text/html, Size: 2821 bytes --]

  reply	other threads:[~2015-08-08  7:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08  3:50 Bob Zhang
2015-08-08  7:37 ` Gabriel Scherer [this message]
2015-08-08 11:25   ` Bob Zhang
2015-08-08 11:28     ` Bob Zhang
2015-08-08 14:13       ` Gabriel Scherer
2015-08-10  2:45         ` Bob Zhang

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='CAPFanBHTonhSZC+L2w2PfRc6hd2t=Kd2-V-QeOtxYtaOKMzj0A@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=Xavier.Leroy@inria.fr \
    --cc=bobzhang1988@gmail.com \
    --cc=caml-list@inria.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).