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:
parent
c6a86be1c0
commit
061670eeb0
@ -55,6 +55,9 @@ LookupModule(Term a)
|
|||||||
if (ModuleName[i] == a)
|
if (ModuleName[i] == a)
|
||||||
return (i);
|
return (i);
|
||||||
ModuleName[i = NoOfModules++] = a;
|
ModuleName[i = NoOfModules++] = a;
|
||||||
|
if (NoOfModules == MaxModules) {
|
||||||
|
Error(SYSTEM_ERROR,a,"number of modules overflowed");
|
||||||
|
}
|
||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
|
|||||||
/* extern int gc_calls; */
|
/* extern int gc_calls; */
|
||||||
|
|
||||||
vsc_count++;
|
vsc_count++;
|
||||||
/* if (vsc_count < 84600) return; */
|
/* if (vsc_count < 3887174000LL) return; */
|
||||||
/*
|
/*
|
||||||
if (vsc_count == 4376) {
|
if (vsc_count == 4376) {
|
||||||
printf("Here I go\n");
|
printf("Here I go\n");
|
||||||
|
@ -386,7 +386,7 @@ typedef enum {
|
|||||||
DBWithRefs = 0x40
|
DBWithRefs = 0x40
|
||||||
} db_term_flags;
|
} db_term_flags;
|
||||||
|
|
||||||
#define MaxModules 255
|
#define MaxModules 256
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Prop NextOfPE; /* used to chain properties */
|
Prop NextOfPE; /* used to chain properties */
|
||||||
|
@ -983,9 +983,10 @@ break :- '$get_value'('$break',BL), NBL is BL+1,
|
|||||||
'$change_alias_to_stream'('$loop_stream',Stream),
|
'$change_alias_to_stream'('$loop_stream',Stream),
|
||||||
repeat,
|
repeat,
|
||||||
( '$current_stream'(_,_,Stream) -> true
|
( '$current_stream'(_,_,Stream) -> true
|
||||||
; '$current_module'(_,OldModule), '$abort_loop'(Stream)
|
; '$abort_loop'(Stream)
|
||||||
),
|
),
|
||||||
prompt('| '), prompt(_,'| '),
|
prompt('| '), prompt(_,'| '),
|
||||||
|
'$current_module'(OldModule),
|
||||||
'$system_catch'('$enter_command'(Stream,Status), OldModule, Error,
|
'$system_catch'('$enter_command'(Stream,Status), OldModule, Error,
|
||||||
user:'$LoopError'(Error)),
|
user:'$LoopError'(Error)),
|
||||||
!.
|
!.
|
||||||
|
Reference in New Issue
Block a user