[m-rev.] Re: deep profiling grade broken
Julien Fischer
juliensf at csse.unimelb.edu.au
Mon Aug 21 01:01:49 AEST 2006
On Sun, 20 Aug 2006, Zoltan Somogyi wrote:
> On 18-Aug-2006, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> The problem can be reduced to:
>>
>> :- module io.
>> :- interface.
>> :- type io.state ---> state(c_pointer).
>> :- type io.io == io.state.
>>
>> (Compile with: mmc -C -O0 --grade asm_fast.gc.profdeep )
>>
>> It looks like something is going wrong with the compiler generated
>> unification predicate for io.io/0.
>
>> Uncaught Mercury exception:
>> Software Error: llds_out.m: Unexpected: stack var out of range
>> Stack dump not available in this grade.
>
> This is strange. I can reproduce the problem on aral and ceres, but not
> on mundula or my laptop.
>
> On all machines, the unify pred for io.io is initially constructed as
>
> equiv_type_cast(HeadVar__1_1, Cast_HeadVar1_3)
> equiv_type_cast(HeadVar__2_2, Cast_HeadVar2_4)
> Cast_HeadVar1_3 = Cast_HeadVar2_4
>
> On mundula and alys (my laptop), the last unification is classified as a
> complicated unify and transformed into a call, which is handled properly.
> On aral and ceres, the last unifications is classified as an atomic unification
> to be implemented directly, which causes the abort because the cast headvars,
> being of dummy type, are allocated dummy stack slots.
>
> I don't know what the cause of the difference between the two pairs of machines
> is, except that it may have to do with the contents of private_builtin (the
> pred id of the unify pred for io.io is different on different systems).
> However, the following diff should avoid the problem arising in the first
> place.
I can't speak for your laptop but mundula has an older rotd installed
than either aral or ceres (I didn't have access to a newer source
distribution when I reinstalled mercury on mundula becuase this bug
was breaking the nightly builds on jupiter.)
The diff looks fine. Thanks for that
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list