From 407ee3949c73e6704265335fc72a37918cf396d5 Mon Sep 17 00:00:00 2001 From: johnvg Date: Wed, 20 Nov 2002 13:56:46 +0000 Subject: 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 --- backendC/CleanCompilerSources/sa.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'backendC') 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; } } -- cgit v1.2.3