fix bad assumption in parse variables overflow handling (stacks can move around in use-malloc).
This commit is contained in:
parent
b2c1523de6
commit
e02ca2f520
@ -4271,6 +4271,8 @@ static Int
|
|||||||
#if EMACS
|
#if EMACS
|
||||||
first_char = tokstart->TokPos;
|
first_char = tokstart->TokPos;
|
||||||
#endif /* EMACS */
|
#endif /* EMACS */
|
||||||
|
if (!Yap_unify(t, ARG2) || !Yap_unify(tpos,ARG5))
|
||||||
|
return FALSE;
|
||||||
if (AtomOfTerm (Deref (ARG1)) == AtomTrue) {
|
if (AtomOfTerm (Deref (ARG1)) == AtomTrue) {
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
CELL *old_H = H;
|
CELL *old_H = H;
|
||||||
@ -4293,11 +4295,10 @@ static Int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable);
|
Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable);
|
||||||
return Yap_unify(t, ARG2) && Yap_unify (v, ARG4) &&
|
return Yap_unify (v, ARG4);
|
||||||
Yap_unify(tpos,ARG5);
|
|
||||||
} else {
|
} else {
|
||||||
Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable);
|
Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable);
|
||||||
return(Yap_unify(t, ARG2) && Yap_unify(tpos,ARG5));
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user