don't use <= to compare with block top (libc may not have block header).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1613 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2006-04-27 17:04:08 +00:00
parent 87a481ca45
commit da7da82733
3 changed files with 17 additions and 6 deletions

View File

@ -11,8 +11,11 @@
* File: index.c *
* comments: Indexing a Prolog predicate *
* *
* Last rev: $Date: 2006-04-27 14:10:36 $,$Author: rslopes $ *
* Last rev: $Date: 2006-04-27 17:04:08 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.164 2006/04/27 14:10:36 rslopes
* *** empty log message ***
*
* Revision 1.163 2006/04/20 15:28:08 vsc
* more graph stuff.
*
@ -4903,13 +4906,13 @@ index_jmp(ClausePointer cur, ClausePointer parent, yamop *ipc, int is_lu, yamop
if (is_lu) {
LogUpdIndex *lcur = cur.lui, *ncur;
/* check myself */
if (ipc >= lcur->ClCode && ipc <= (yamop *)((CODEADDR)lcur+lcur->ClSize))
if (ipc >= lcur->ClCode && ipc < (yamop *)((CODEADDR)lcur+lcur->ClSize))
return cur;
/* check if I am returning back to a parent, eg
switch with intermediate node */
if (lcur->ParentIndex) {
LogUpdIndex *pcur = lcur->ParentIndex;
if (ipc >= pcur->ClCode && ipc <= (yamop *)((CODEADDR)pcur+pcur->ClSize)) {
if (ipc >= pcur->ClCode && ipc < (yamop *)((CODEADDR)pcur+pcur->ClSize)) {
cur.lui = pcur;
return cur;
}
@ -4931,7 +4934,7 @@ index_jmp(ClausePointer cur, ClausePointer parent, yamop *ipc, int is_lu, yamop
if (!scur)
return cur;
if (ipc >= scur->ClCode &&
ipc <= (yamop *)((CODEADDR)scur+scur->ClSize))
ipc < (yamop *)((CODEADDR)scur+scur->ClSize))
return cur;
ncur = ClauseCodeToStaticIndex(ipc);
if (ncur->ClPred == scur->ClPred) {
@ -4942,7 +4945,7 @@ index_jmp(ClausePointer cur, ClausePointer parent, yamop *ipc, int is_lu, yamop
if (parent.si != cur.si) {
if (parent.si) {
StaticIndex *pcur = parent.si;
if (ipc >= pcur->ClCode && ipc <= (yamop *)((CODEADDR)pcur+pcur->ClSize))
if (ipc >= pcur->ClCode && ipc < (yamop *)((CODEADDR)pcur+pcur->ClSize))
return parent;
}
}
@ -5706,7 +5709,7 @@ cross_block(path_stack_entry *sp, yamop **pipc, PredEntry *ap)
else
bsize = block->si.ClSize;
if (ipc > (yamop *)block &&
ipc <= (yamop *)((CODEADDR)block + bsize)) {
ipc < (yamop *)((CODEADDR)block + bsize)) {
path_stack_entry *nsp = tsp+1;
for (;tsp<sp;tsp++) {
if (tsp->flag == pc_entry) {

View File

@ -141,6 +141,13 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
// UNLOCK(Yap_heap_regs->low_level_trace_lock);
// return;
// }
if (vsc_count == 22965LL) {
jmp_deb(1);
}
if (vsc_count < 1468068888) {
UNLOCK(Yap_heap_regs->low_level_trace_lock);
return;
}
#ifdef COMMENTED
// if (vsc_count == 218280)
// vsc_xstop = 1;

View File

@ -16,6 +16,7 @@
<h2>Yap-5.1.2:</h2>
<ul>
<li> FIXED: don't compare block top with <= (obs Paulo Moura).</li>
<li> FIXED: ! was not pruning right in p_execute_clause (obs Nicos
Angelopoulos).</li>
<li> FIXED: system/1 and shell/1 should check return code (obs Nicos