diff options
author | johnvg | 2002-11-20 13:56:46 +0000 |
---|---|---|
committer | johnvg | 2002-11-20 13:56:46 +0000 |
commit | 407ee3949c73e6704265335fc72a37918cf396d5 (patch) | |
tree | 5cdfd30e6ec8083580177ada5090b753b9682dc4 /backendC/CleanCompilerSources | |
parent | use rem instead of mod (diff) |
fix crash that occurs if there is not enough memory
to convert the syntax tree and the analyser is used
again for functions that are generated later
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1286 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC/CleanCompilerSources')
-rw-r--r-- | backendC/CleanCompilerSources/sa.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backendC/CleanCompilerSources/sa.c b/backendC/CleanCompilerSources/sa.c index 6d00ba6..1be3039 100644 --- a/backendC/CleanCompilerSources/sa.c +++ b/backendC/CleanCompilerSources/sa.c @@ -5651,8 +5651,11 @@ void StrictnessAnalysis (ImpMod imod) int StrictnessAnalysisConvertRules (ImpRuleS *rules) { - initialising = True; + if (initialising) + return 0; + initialising=True; + if (setjmp (SAEnv)==0){ ImpRuleS *rule; @@ -5668,6 +5671,8 @@ int StrictnessAnalysisConvertRules (ImpRuleS *rules) return 1; } else { FreeUnFreezedBlocks(); + if (StrictWarning) + GiveStrictWarning (NULL,"not enough memory for strictness analysis of all functions"); return 0; } } |