[m-rev.] For review: Fix bug 180
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu Feb 3 21:14:28 AEDT 2011
On Thu, 3 Feb 2011, Paul Bone wrote:
> Branches: main 11.01
>
> Fix bug180.
>
> bug180's symptom was a crash in the code generator when compiling ssdb/ssdb.m
> with inlining in a deep-profiling grade.
>
> The pre-profiling simplify transformation can introduce new variables and did
> not update the varset in the proc_info structure, but did add new entries to
> the vartypes map. Then when the deep-profiling transformation executes it
> allocates it's own new variables using an old varset, causing it to clobber
> existing entries in the vartypes array. This means that variables created by
> the simplification transformation that are referenced by goals are now
> clobbered by the deep-profiler variables
>
> tests/valid/bug180.m:
> tests/valid/bug180_mdb.m:
> tests/valid/Mmakefile:
> tests/valid/Mercury.options:
> Add a regression test for bug180 to the test suite.
>
> compiler/simplify.m:
> Fix bug180 by always updating the proc_info's varset.
>
> compiler/deep_profiling.m:
> Use svmap.det_insert rather than svmap.set to detect these types of errors
> earlier.
>
> compiler/handle_options.m:
> Add a new dump hlds alias to help debug variable-related problems.
The bug-fix itself is fine. I recommend trying to cut down the size of
the regression test though.
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