caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: "Alexander V.Voinov" <avv@quasar.ipa.nw.ru>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Bugfix for ocaml-3.05 problem (was: recompiling ocamlnet & PXP with 3.05)
Date: Tue, 30 Jul 2002 23:18:21 +0200	[thread overview]
Message-ID: <20020730211821.GA1806@ice.gerd-stolpmann.de> (raw)
In-Reply-To: <20020730.120120.92581149.avv@quasar.ipa.nw.ru>; from avv@quasar.ipa.nw.ru on Tue, Jul 30, 2002 at 21:01:20 +0200

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


On 2002.07.30 21:01 Alexander V.Voinov wrote:
> Hi
> 
> ocamlc crashes at some of the sources of the mentioned modules.
> 
> Under Linux/x86 it crashed on 
> 
> ocamlfind ocamlc -g  -package "netstring" -c pxp_document.ml
> ocamlc got signal and exited
> 
> Under Solaris/Sparc it crashed on the netstring as well. Netstring
> (and PXP) compiled OK in the same environment under 3.04.

Hi,

yesterday I already got a similar report from Michaël Marchegay, and
I could reproduce the problem. I submitted a bug report (23:44),
and Xavier Leroy and Damien Doligez fixed the problem until 15:36.
Really phantastic response time!

You can read the bug report with some more details how to
circumvent the problem:

http://caml.inria.fr/bin/caml-bugs/fixed?id=1273;page=44;user=guest

For your convenience, I have the attached the patch. Apply it
as follows:

cd ocaml-3.05/byterun
patch -p0 <../../whereever-your-patch-is/patch

Then rebuild the whole system:

cd ..
make clean
make world opt opt.opt

It would be sufficient to rebuild ocamlrun and all statically linked
binaries, there is no change in the libraries (except libcamlrun.a), 
but I don't know how to do this.

I think O'Caml-3.05 is still worth to be tried, there are numerous
improvements, and at least for me this GC bug does not prevent me
from using this version. It is not a fundamental problem, only a 
single error.

Gerd
-- 
----------------------------------------------------------------------------
Gerd Stolpmann      Telefon: +49 6151 997705 (privat)
Viktoriastr. 45             
64293 Darmstadt     EMail:   gerd@gerd-stolpmann.de
Germany                     
----------------------------------------------------------------------------

[-- Attachment #2: ocaml-3.05-gc.patch --]
[-- Type: text/plain, Size: 2119 bytes --]

Index: byterun/major_gc.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/byterun/major_gc.c,v
retrieving revision 1.37
retrieving revision 1.39
diff -u -r1.37 -r1.39
--- major_gc.c	2002/06/05 12:11:15	1.37
+++ major_gc.c	2002/07/30 13:48:52	1.39
@@ -11,7 +11,7 @@
 /*                                                                     */
 /***********************************************************************/
 
-/* $Id: major_gc.c,v 1.37 2002/06/05 12:11:15 doligez Exp $ */
+/* $Id: major_gc.c,v 1.39 2002/07/30 13:48:52 xleroy Exp $ */
 
 #include <limits.h>
 
@@ -126,15 +126,12 @@
       if (Tag_hd (hd) < No_scan_tag){
         for (i = 0; i < size; i++){
           child = Field (v, i);
-        mark_again:
           if (Is_block (child) && Is_in_heap (child)) {
             hd = Hd_val(child);
             if (Tag_hd (hd) == Forward_tag){
-              child = Forward_val (child);
-              Field (v, i) = child;
-              goto mark_again;
+              Field (v, i) = Forward_val (child);
             }
-            if (Tag_hd(hd) == Infix_tag) {
+            else if (Tag_hd(hd) == Infix_tag) {
               child -= Infix_offset_val(child);
               hd = Hd_val(child);
             }
@@ -192,15 +189,13 @@
           sz = Wosize_hd (hd);
           for (i = 1; i < sz; i++){
             curfield = Field (cur, i);
-          weak_again:
-            if (curfield != 0 && Is_block (curfield) && Is_in_heap (curfield)
-                && Is_white_val (curfield)){
+            if (curfield != 0 && Is_block (curfield) && Is_in_heap (curfield)){
               if (Tag_val (curfield) == Forward_tag){
-                curfield = Forward_val (curfield);
-                Field (cur, i) = curfield;
-                goto weak_again;
+                Field (cur, i) = Forward_val (curfield);
               }
-              Field (cur, i) = 0;
+              else if (Is_white_val (curfield)){
+                Field (cur, i) = 0;
+              }
             }
           }
           weak_prev = &Field (cur, 0);

  reply	other threads:[~2002-07-30 21:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30 19:01 [Caml-list] recompiling ocamlnet & PXP with 3.05 Alexander V.Voinov
2002-07-30 21:18 ` Gerd Stolpmann [this message]
2002-07-31  3:44   ` [Caml-list] Bugfix for ocaml-3.05 problem (was: recompiling ocamlnet & PXP with 3.05) Alexander V. Voinov

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=20020730211821.GA1806@ice.gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=avv@quasar.ipa.nw.ru \
    --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).