2018-05-21 03:18 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000426mercuryBugpublic2016-10-21 15:47
Assigned To 
Product Version 
Target VersionFixed in Version 
Summary0000426: Tabling broken on 32-bit Cygwin
DescriptionPretty much every tabling test case and the compiler itself (the CTGC code uses pragma memo)
abort with an error about having detected infinite recursion. In the tabling transformation, det procedures are transformed as follows:

    p(A, B) :-
       TO = <table pointer for p/2>,
       impure table_lookup_insert(T0, A, T),
       impure table_loop_setup(T, Status),
           Status = loop_active,
           error("detected infinite recursion in ...")
           Status = loop_inactive,

On Cygwin the variable Status gets set to a rubbish value at some points. It actually ends up matching the default case of the C switch we generate for the above Mercury switch but then falls through to the infinite recursion case. (Enabling assertions would cause it to abort.) I haven't tracked down why this is occurring although it may have something to do with the fact that on Windows sizeof(int) == sizeof(long). (Is the tabling code making assumption that sizeof(long) > sizeof(int) somewhere?)


TagsNo tags attached.
Attached Files


There are no notes attached to this issue.

-Issue History
Date Modified Username Field Change
2016-10-21 15:47 juliensf New Issue
+Issue History