[m-rev.] diff: fix the bug reported by Michael Day

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Apr 20 14:20:43 AEST 2006


On Thu, 20 Apr 2006, Zoltan Somogyi wrote:

> Fix a bug reported by Michael Day. The bug was that when frameopt wanted
> to find out whether a block of instructions referred to stack variables,
> it did not look past pragma_c_code LLDS instructions. As a result, the
> generated code included a (redundant) assignment to a stack variable
> in a section of code that, after frameopt, did not have a stack frame
> anymore. It therefore overwrote part of its caller's stack frame, which
> caused a crash.
>
> compiler/opt_util.m:
> 	Fix the auxiliary predicate used by frameopt.
>
> tests/hard_coded/prince_frameopt.{m,exp}:
> tests/hard_coded/prince_frameopt_css.m:
> tests/hard_coded/prince_frameopt_css.style.m:
> 	The new test case (a three module program).
>
> tests/hard_coded/Mmakefile:
> tests/hard_coded/Mercury.options:
> 	Enable the new test case, and compile it with the options required
> 	to show the bug if it exists.
>
That looks good.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list