2024-11-22 15:12 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000048mercuryBugpublic2008-03-26 15:32
Reporterjuliensf 
Assigned Tomark 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000048: compiler abort in .decldebug grade
DescriptionCompiling compiler/analysis.m in asm_fast.gc.decldebug on pluto (linux-x86_64) results in

Uncaught Mercury exception:
Software Error: map.lookup: key not found
Key Type: term.var(parse_tree.prog_data.prog_var_type)
Key Value: var(160)
Value Type: ll_backend.var_locn.var_state

This Mercury compiler used was rotd-2008-02-27.
Compiling the affected module with -O0 makes the problem go away.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000080

juliensf (administrator)

I've added the workaround for this to compiler/Mercury.options and committed it.

~0000081

juliensf (administrator)

--common-struct seems to be triggering the problem. The bug does not occur with
--no-common-struct.

~0000082

zs (developer)

The problem is caused by one or more bugs in common.m, as shown by the attached diff between the HLDS dumps at level 55 and 65. The diff shows that common.m finds and eliminates several common structures, most of which are type_infos or type_ctor_infos, and one of which is an ordinary field of the analysis_info structure. I have visually examined the diff and I think all these changes in the code are fine.

The problems lie in the changes to the rtti var maps. The diff shows some updates to type_class_info maps that I don't think should be there. It does NOT show updates to type_info maps that SHOULD be there. Common.m eliminates several type_info variables, replacing them with references to other, identical type_info variables, but does not update the rtti_var_maps. (common.m was written BEFORE we added rtti_var_maps.) I believe these dangling references that cause the bug symptom.

~0000083

juliensf (administrator)

For reference, this is r1.2 of compiler/analysis.m.

~0000091

mark (administrator)

I've committed one fix to some dangling references left by common.m
(26/3/2008). This allows compilation of analysis.m to complete.
However, similar segfaults have been reported in the G12 project,
so I'll leave this bug open and investigate further.

~0000092

mark (administrator)

The other failures were caused by a different bug,
which I have reported as bug 0000054
+Notes

-Issue History
Date Modified Username Field Change
2008-02-28 02:55 juliensf New Issue
2008-02-28 03:03 juliensf Note Added: 0000080
2008-02-28 11:45 juliensf Note Added: 0000081
2008-02-28 16:27 zs File Added: DIFF.55_65
2008-02-28 16:33 zs Note Added: 0000082
2008-02-28 17:10 juliensf Status new => assigned
2008-02-28 17:10 juliensf Assigned To => mark
2008-02-28 17:13 juliensf Note Added: 0000083
2008-03-26 12:51 mark Note Added: 0000091
2008-03-26 15:32 mark Note Added: 0000092
2008-03-26 15:32 mark Status assigned => resolved
2008-03-26 15:32 mark Resolution open => fixed
+Issue History