fix overflow fixes
This commit is contained in:
parent
444fc8fb7f
commit
aef5725901
@ -714,7 +714,7 @@ Yap_NewThreadPred(PredEntry *ap)
|
|||||||
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
|
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
|
||||||
|
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
return NULL;
|
return NIL;
|
||||||
}
|
}
|
||||||
INIT_LOCK(p->PELock);
|
INIT_LOCK(p->PELock);
|
||||||
p->KindOfPE = PEProp;
|
p->KindOfPE = PEProp;
|
||||||
@ -762,11 +762,13 @@ Yap_NewPredPropByAtom(AtomEntry *ae, Term cur_mod)
|
|||||||
{
|
{
|
||||||
Prop p0;
|
Prop p0;
|
||||||
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
|
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
|
||||||
if (!p)
|
|
||||||
return NIL;
|
|
||||||
|
|
||||||
/* Printf("entering %s:%s/0\n", RepAtom(AtomOfTerm(cur_mod))->StrOfAE, ae->StrOfAE); */
|
/* Printf("entering %s:%s/0\n", RepAtom(AtomOfTerm(cur_mod))->StrOfAE, ae->StrOfAE); */
|
||||||
|
|
||||||
|
if (p == NULL) {
|
||||||
|
WRITE_UNLOCK(ae->ARWLock);
|
||||||
|
return NIL;
|
||||||
|
}
|
||||||
INIT_LOCK(p->PELock);
|
INIT_LOCK(p->PELock);
|
||||||
p->KindOfPE = PEProp;
|
p->KindOfPE = PEProp;
|
||||||
p->ArityOfPE = 0;
|
p->ArityOfPE = 0;
|
||||||
|
@ -1344,18 +1344,16 @@ a_p(op_numbers opcode, clause_info *clinfo, yamop *code_p, int pass_no, struct i
|
|||||||
GONEXT(Osbpp);
|
GONEXT(Osbpp);
|
||||||
}
|
}
|
||||||
else if (opcode == _execute ||
|
else if (opcode == _execute ||
|
||||||
opcode == _dexecute) {
|
opcode == _dexecute) {
|
||||||
if (pass_no) {
|
if (pass_no) {
|
||||||
if (opcode == _execute &&
|
if (Flags & CPredFlag) {
|
||||||
(RepPredProp(fe)->PredFlags & CPredFlag)) {
|
|
||||||
code_p->opc = emit_op(_execute_cpred);
|
code_p->opc = emit_op(_execute_cpred);
|
||||||
}
|
}
|
||||||
code_p->u.pp.p = RepPredProp(fe);
|
code_p->u.pp.p = RepPredProp(fe);
|
||||||
code_p->u.pp.p0 = clinfo->CurrentPred;
|
code_p->u.pp.p0 = clinfo->CurrentPred;
|
||||||
}
|
}
|
||||||
GONEXT(pp);
|
GONEXT(pp);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (pass_no)
|
if (pass_no)
|
||||||
code_p->u.p.p = RepPredProp(fe);
|
code_p->u.p.p = RepPredProp(fe);
|
||||||
GONEXT(p);
|
GONEXT(p);
|
||||||
@ -2900,7 +2898,6 @@ do_pass(int pass_no, yamop **entry_codep, int assembling, int *clause_has_blobsp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (cip->cpc) {
|
while (cip->cpc) {
|
||||||
|
|
||||||
switch ((int) cip->cpc->op) {
|
switch ((int) cip->cpc->op) {
|
||||||
#ifdef YAPOR
|
#ifdef YAPOR
|
||||||
case sync_op:
|
case sync_op:
|
||||||
|
Reference in New Issue
Block a user