bad meta-call causing undetected module overflow.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@436 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-04-09 15:12:14 +00:00
parent c6a86be1c0
commit 061670eeb0
4 changed files with 7 additions and 3 deletions

View File

@ -55,6 +55,9 @@ LookupModule(Term a)
if (ModuleName[i] == a)
return (i);
ModuleName[i = NoOfModules++] = a;
if (NoOfModules == MaxModules) {
Error(SYSTEM_ERROR,a,"number of modules overflowed");
}
return (i);
}

View File

@ -112,7 +112,7 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
/* extern int gc_calls; */
vsc_count++;
/* if (vsc_count < 84600) return; */
/* if (vsc_count < 3887174000LL) return; */
/*
if (vsc_count == 4376) {
printf("Here I go\n");

View File

@ -386,7 +386,7 @@ typedef enum {
DBWithRefs = 0x40
} db_term_flags;
#define MaxModules 255
#define MaxModules 256
typedef struct {
Prop NextOfPE; /* used to chain properties */

View File

@ -983,9 +983,10 @@ break :- '$get_value'('$break',BL), NBL is BL+1,
'$change_alias_to_stream'('$loop_stream',Stream),
repeat,
( '$current_stream'(_,_,Stream) -> true
; '$current_module'(_,OldModule), '$abort_loop'(Stream)
; '$abort_loop'(Stream)
),
prompt('| '), prompt(_,'| '),
'$current_module'(OldModule),
'$system_catch'('$enter_command'(Stream,Status), OldModule, Error,
user:'$LoopError'(Error)),
!.