generate an Error on memory overflow.
This commit is contained in:
parent
67d9e0ef26
commit
de043e3ee9
@ -669,9 +669,11 @@ YAP_MkBlobTerm(unsigned int sz)
|
||||
BACKUP_H();
|
||||
|
||||
while (H+(sz+sizeof(MP_INT)/sizeof(CELL)+2) > ASP-1024) {
|
||||
if (!doexpand((sz+sizeof(MP_INT)/sizeof(CELL)+2)*sizeof(CELL)))
|
||||
if (!doexpand((sz+sizeof(MP_INT)/sizeof(CELL)+2)*sizeof(CELL))) {
|
||||
Yap_Error(OUT_OF_STACK_ERROR, TermNil, "YAP failed to grow the stack while constructing a blob: %s", Yap_ErrorMessage);
|
||||
return TermNil;
|
||||
}
|
||||
}
|
||||
I = AbsAppl(H);
|
||||
H[0] = (CELL)FunctorBigInt;
|
||||
dst = (MP_INT *)(H+1);
|
||||
|
Reference in New Issue
Block a user