[MLton-user] mlton on sparc-solaris10 ?

Bernard Berthomieu Bernard.Berthomieu@laas.fr
Thu, 03 Nov 2005 15:13:53 +0100


>> We   are  having   trouble  running   on  a   sparc-solaris10  machine
>> applications   build  by   mlton  on   a  sparc-solaris9   machine  (a
>> SunFireV250).
>>
>> We  invariably   get  a  segmentation  fault,   unless  libraries  are
>> statically linked  with the  application.
>
>
> Have you tried compiling a simple program with  -debug true  on the 
> sparc-solaris9 machine and running the resulting executable on the 
> sparc-solaris10 machine?  The debug runtime includes a lot of asserts 
> which might point to a machine characteristic that changed.

Yes, but nothing was printed.

Applying pstack to the core generated, or calling mlton of the 
applications by
truss says that the failure occurs very early, in the initialization 
phase of mlton.

I suspect a problem when linking dynamic libraries. It looks like the mlton
heap or some other mlton area is overwritten by the dynamically linked
libraries (or the converse ...).

Some observations:

- my apps works fine if all library required are statically linked when
built (on Solaris 9);

- my app works better (the core is generated in exithandle, rather than
at the beginning :-)) when it is linked with versions of libmlton.a and
libgdtoa.a compiled with -O0 (rather than -O1 or -O2). The optimization
itself has probably nothing to do with it, but the sizes of the *.a 
produced
are different then, and so, if any, the overlap does not occur at the same
addresses ...

- I tried several versions of gcc (2.95.2, 3.4), with the same results;

- I tried another Solaris 10 machine, of a different architecture, with
the same results.

  Bernard.