[m-dev.] Diff: Fix an old CLP(R) bug
Warwick Harvey
wharvey at cs.monash.edu.au
Thu Feb 3 18:02:36 AEDT 2000
Estimated hours taken: 0.25
Fix an _old_ CLP(R) bug.
clpr/clpr/init.c:
When checking pointers to determine whether tagging is going to work
OK, check all three kinds of pointers, not just the first two.
Index: init.c
===================================================================
RCS file: /home/mercury1/repository/clpr/clpr/init.c,v
retrieving revision 1.9
diff -u -r1.9 init.c
--- init.c 1997/10/06 12:32:35 1.9
+++ init.c 2000/02/03 06:53:50
@@ -383,7 +383,7 @@
amask[1] = intptr(ptr[1]) & MASK4;
amask[2] = intptr(ptr[2]) & MASK4;
- for (i=0; i < 2; i++)
+ for (i=0; i < 3; i++)
if (((CLPR_int) amask[i]) < 0)
init_fatal("Pointer topmost bit being used,\ncannot install: (%x)\n", amask[i]);
else if (amask[i] != amask[0]) {
@@ -392,7 +392,7 @@
}
if (flag) {
fprintf(stderr, "Inconsistent masks\n");
- for (i=0; i < 2; i++)
+ for (i=0; i < 3; i++)
fprintf(stderr, "amask[%d] = %x\n", i, amask[i]);
init_fatal("Funny pointers",0);
}
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list