Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001272OCamlOCaml generalpublic2002-07-29 22:312002-08-06 10:24
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001272: 3.05 build problem on solaris
DescriptionFull_Name: Luc Habert
Version: 3.05
OS: Solaris 7
Submission from: clipper-gw.ens.fr (129.199.1.22)


When trying to build ocaml 3.05, I get a segfault when it gets to creating
the camltk toplevel :

../../../ocamlcomp.sh -verbose -linkall -o labltktop -I ../support \
       -I ../../../toplevel toplevellib.cma \
       -I ../labltk -I ../camltk labltk.cma \
       -I ../../unix unix.cma \
       -I ../../str str.cma \
       topmain.cmo
make[2]: *** [labltktop] Segmentation Fault

I have been able to find a workaround : compile without tk (that works
fine), then do two « make bootstrap » (I haven't tried with only one, I did
two because the INSTALL advises to try it), then compile by hand (i.e. by
calling directly the inner makefiles) the labltk lib with the bootstraped
compiler, and then everything has worked fine. I have checked that the
bootstraped compiler and the one that ships with the distribution are
different, and they indeed are (I checked after removing the #! line of
course).

In case that might help, the tk version installed is 8.3.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002526)
administrator (administrator)
2002-07-30 15:45

Bonjour,

> When trying to build ocaml 3.05, I get a segfault when it gets to creating
> the camltk toplevel :
>
> ../../../ocamlcomp.sh -verbose -linkall -o labltktop -I ../support \
> -I ../../../toplevel toplevellib.cma \
> -I ../labltk -I ../camltk labltk.cma \
> -I ../../unix unix.cma \
> -I ../../str str.cma \
> topmain.cmo
> make[2]: *** [labltktop] Segmentation Fault

Je n'ai pas pu reproduire ce plantage ici, mais un autre utilisateur
nous a mis sur la trace d'un bug de GC qui pourrait être relié.
Est-ce que tu pourrais réessayer à partir de la distrib 3.05 en
appliquant le patch ci-joint avant de faire "make world"?

> I have checked that the
> bootstraped compiler and the one that ships with the distribution are
> different, and they indeed are (I checked after removing the #! line of
> course).

Oui, c'est vrai, et c'est dû à un changement mineur de la bibliothèque
standard entre le moment où boot/ocamlc a été construit (chez nous) et
la release. Mais en soi cela n'est pas une condition suffisante pour
faire tout planter :-)

- Xavier Leroy

----------------
Index: byterun/major_gc.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/byterun/major_gc.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- major_gc.c 2002/06/05 12:11:15 1.37
+++ major_gc.c 2002/07/30 13:02:31 1.38
@@ -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.38 2002/07/30 13:02:31 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);

----------------
----------------
(0002527)
administrator (administrator)
2002-08-06 10:24

Couldn't reproduce

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker