2024-11-22 00:07 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000071mercuryBugpublic2021-01-09 15:59
Reporterjuliensf 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000071: compiler abort when building programs in debugging grades
DescriptionThe attached program aborts with the following:

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

Compile with: mmc --grade asm_fast.gc.tr.debug -C zinc_fdic_solver.m
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000109

zs (developer)

The problem arises from the duplication by switch detection of the deconstruction unification that bind a typeclassinfo. Originally,
that typeclassinfo is var 37. It is duplicated as var 81. The duplication
updates the rtti_var_info but not the type_info varmap or the typeclass_info
varmap, as shown below from this extract from the HLDS dump after switch detection:

% type_info varmap:
% I_1 (number 1) -> typeclass_info(TypeClassInfo_for_int_var_37, 1) (number 37)
% typeclass_info varmap:
% zinc_fdic_solver.int_var(I_1) -> TypeClassInfo_for_int_var_37

% rtti_var_info:
% TypeClassInfo_for_int_var_37 (number 37) -> typeclass_info for zinc_fdic_solver.int_var(I_1)
% TypeClassInfo_for_int_var_81 (number 81) -> typeclass_info for zinc_fdic_solver.int_var(I_1)

The code generator looks at the first two maps when generating layout structures for the debugger.

~0001127

juliensf (administrator)

The abort message is now:

Uncaught Mercury exception:
Software Error: predicate `ll_backend.var_locn.actually_place_var'/6: Unexpected: placing nondummy var which has no state
+Notes

-Issue History
Date Modified Username Field Change
2008-07-30 17:55 juliensf New Issue
2008-07-30 17:55 juliensf File Added: zinc_fdic_solver.m
2008-08-01 12:29 zs Note Added: 0000109
2021-01-09 15:59 juliensf Note Added: 0001127
+Issue History