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 F0EAD7EEBF for ; Sat, 8 Aug 2015 09:38:22 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.213.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.213.173 as permitted sender) identity=mailfrom; client-ip=209.85.213.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; 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@mail-ig0-f173.google.com) identity=helo; client-ip=209.85.213.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ig0-f173.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CPAQAAscVVm63VVdFbgzo1aQaDHqoekXiFeQKBIwdMAQEBAQEBEgEBAQEBBgsLCSEuhCQBAQMBEhEdARsdAQMMBgUEBzcCAiEBAREBBQEcBhMih3YBAwoIDalZgS4+MYs/gWyCeYsbChknDVeEVQEBAQEBBQEBAQEBAQEVAQUOi0GCT4I2BAeCaYFDBZULhQGFdIFsgUlGkDsKg0OCGhIjgRcXhA48MYJMAQEB X-IPAS-Result: A0CPAQAAscVVm63VVdFbgzo1aQaDHqoekXiFeQKBIwdMAQEBAQEBEgEBAQEBBgsLCSEuhCQBAQMBEhEdARsdAQMMBgUEBzcCAiEBAREBBQEcBhMih3YBAwoIDalZgS4+MYs/gWyCeYsbChknDVeEVQEBAQEBBQEBAQEBAQEVAQUOi0GCT4I2BAeCaYFDBZULhQGFdIFsgUlGkDsKg0OCGhIjgRcXhA48MYJMAQEB X-IronPort-AV: E=Sophos;i="5.15,633,1432591200"; d="scan'208";a="142312133" Received: from mail-ig0-f173.google.com ([209.85.213.173]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Aug 2015 09:38:21 +0200 Received: by igbpg9 with SMTP id pg9so44097955igb.0; Sat, 08 Aug 2015 00:38:20 -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=uUyRpEIGbKTjR268OCNJedJ3eGmVnXjRZPRCO4N+mjI=; b=e0x+CqiuBQpOkjESq2DbBdTASFC6rUfo39KRkqifgguhY+BzUs5job8B/Po/KrnFCe RqcAr7gCkLITxFGY68mtGK4B2eXe451w/AD1WZ+rhcqMfvqdwOFDem3gJxVYE7TzQ72R h8SC4MS3skFTtDVIcVozP1Nr+NVCd0sCccWMiNxsSEL0a2eHm8tIBD3inE2FTzmmEzUv zn6iYyKICvRcEENBttffwRG/QnWhrMXowpKpAEBAXpkbqS++JLkRphbMDOOElLKsDfKe McyXE0eIsDeeSb1f390DYwpAAblEKvSsT2IdxRYoJOfI675C1oYS6Vai3if0mHsdPUJa +5HQ== X-Received: by 10.50.128.169 with SMTP id np9mr2121861igb.37.1439019500660; Sat, 08 Aug 2015 00:38:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.68.132 with HTTP; Sat, 8 Aug 2015 00:37:41 -0700 (PDT) In-Reply-To: References: From: Gabriel Scherer Date: Sat, 8 Aug 2015 09:37:41 +0200 Message-ID: To: Bob Zhang Cc: Caml List , Xavier Leroy Content-Type: multipart/alternative; boundary=047d7b10ca83296ee1051cc7d6ea Subject: Re: [Caml-list] Questions about changing lambda IR --047d7b10ca83296ee1051cc7d6ea Content-Type: text/plain; charset=UTF-8 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 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 > --047d7b10ca83296ee1051cc7d6ea Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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, "mak= e world", "make opt", "make opt.opt" work.)

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

<= div>Dear caml develpers,

=C2=A0 =C2=A0I am working on an experimenta= l branch to pass more information from typedtree to lambda to enable ocaml = generate user readable javascript code(https://github.com/bobzhang/ocaml/t= ree/master) (online-demo: http://zhanghongbo.me/js-demo/)

=C2=A0 =C2=A0Here I get a segfault, after I change const_block:
=C2=A0 =C2=A0Below is my minimal change:

```
type pointer_info =3D=C2=A0
=C2=A0 | NullConstructor of str= ing
=C2=A0 | NullVariant of string=C2=A0
=C2=A0 | NAPoi= nter=C2=A0

type tag_info =3D=C2=A0
= =C2=A0 | Constructor of string
=C2=A0 | Tuple
=C2=A0 | = Variant of string=C2=A0
=C2=A0 | Record=C2=A0
=C2=A0 | = NA

type structured_constant =3D
= =C2=A0 =C2=A0 Const_base of constant
=C2=A0 | Const_pointer of in= t * pointer_info
=C2=A0 | Const_block of int * tag_info * structu= red_constant list
=C2=A0 | Const_float_array of string list
=
=C2=A0 | Const_immstring of string
```
Note that t= he 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 ../../byte= comp -I ../../asmcomp e= xtract_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 fil= e `extract_crc'
make[2]: *** [otherlibraries] Error 2
make[1]: *** [all] Error 2
```

= Any help is appreciated : )

--
Regards
-- Hongbo Zhang

--047d7b10ca83296ee1051cc7d6ea--