Huge atoms in scanner may generate heap overflow.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1532 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -752,6 +752,7 @@ Yap_tokenizer(int inp_stream)
|
||||
/* huge atom or variable, we are in trouble */
|
||||
Yap_ErrorMessage = "Code Space Overflow due to huge atom";
|
||||
Yap_Error_TYPE = OUT_OF_AUXSPACE_ERROR;
|
||||
Yap_ReleasePreAllocCodeSpace((CODEADDR)TokImage);
|
||||
if (p)
|
||||
p->Tok = Ord(kind = eot_tok);
|
||||
/* serious error now */
|
||||
@@ -764,6 +765,7 @@ Yap_tokenizer(int inp_stream)
|
||||
/* don't do this in iso */
|
||||
Atom ae = Yap_LookupAtom(TokImage);
|
||||
if (ae == NIL) {
|
||||
Yap_Error_TYPE = OUT_OF_HEAP_ERROR;
|
||||
Yap_ErrorMessage = "Code Space Overflow";
|
||||
if (p)
|
||||
t->Tok = Ord(kind = eot_tok);
|
||||
|
Reference in New Issue
Block a user