[mercury-users] Re: segfault in hlc.gc when optimise-constructor-last-call is enabled

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Mar 1 02:15:56 AEDT 2011



HI Michael,

On Sun, 27 Feb 2011, Michael Day wrote:

> If the attached bad.m is compiled with rotd-2011-02-21 in hlc.gc with 
> optimise-constructor-last-call enabled like this:
>
> mmc --grade hlc.gc --make bad --optimise-constructor-last-call
>
> Then the resulting executable will segfault:
>
> $ ./bad
> num_float(
> *** Mercury runtime: caught segmentation violation ***
> cause: address not mapped to object
> address involved: (nil)

That's not so good :-(

> Any assistance would be very gratefully appreciated, as we do take a 
> performance hit if we have to disable this optimisation.

As a workaround try disabling the removal of excess assignment
unifications, e.g. compile with --no-excess-assign.  Doing so avoids
the problem, at least for the test case.

We will look into the problem.

Cheers,
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list