2019-12-16 11:07 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000074mercuryBugpublic2008-09-02 04:42
Reporterobo 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusconfirmedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000074: abstract data types in type classes get garbled on x64
DescriptionThe attached code is a reduced version of bug 0000073 (please close bug 0000073).

What happens is that the method recombine/1 of typeclass stackable/3 instantiated by the predicate myrecombine/1 gets called with a bad type information on 64-bit machines (rotd-2008-08-03):

18:15 tauri4 nano-nano$./bug_x64_typeclass
insprune calls recombine: bug_x64_typeclass.h(string, string)
Recombining: bug_x64_typeclass.h(bug_x64_typeclass.h(string, string), bug_x64_typeclass.h(string, string))
Uncaught Mercury exception:
Software Error: type screwed up

On 32-bit machines (rotd-2007-08-13, I don't have a fresher version, sorry), the code works.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000117

juliensf (administrator)

The same also occurs on 32-bit machines with rotd-2008-08-06.

~0000144

juliensf (administrator)

The problem here is that the current Mercury RTTI implementation does not supported
"complicated" typeclass constraints like the following:

:- pred myrecombine(h(OCC, OC)::in) is semidet <= (stackable(h(OCC, OC), float, string)).

Currently, the parameters of typeclass constraints can only be type variables or types
with no arguments. Anything else, like h(OCC, OC), (probably) won't work.
+Notes

-Issue History
Date Modified Username Field Change
2008-08-07 02:32 obo New Issue
2008-08-07 02:32 obo File Added: bug_x64_typeclass.m
2008-08-07 15:27 juliensf Note Added: 0000117
2008-08-07 15:27 juliensf Status new => acknowledged
2008-09-02 04:41 juliensf Note Added: 0000144
2008-09-02 04:42 juliensf Status acknowledged => confirmed
+Issue History