From: ceriel Date: Fri, 15 Apr 1988 17:25:01 +0000 (+0000) Subject: check for total size of locals and parameters X-Git-Tag: release-5-5~3421 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9dbd7bdcf5a93f99429f3a09af10f9348a1e4632;p=ack.git check for total size of locals and parameters --- diff --git a/lang/cem/cemcom/code.c b/lang/cem/cemcom/code.c index 6ccea0b96..1fb91cf69 100644 --- a/lang/cem/cemcom/code.c +++ b/lang/cem/cemcom/code.c @@ -283,6 +283,10 @@ end_proc(fbytes) C_beginpart(pro_id); C_pro(pro_name, nbytes); #endif + if (fbytes > max_int) { + error("%s has more than %ld parameter bytes", + pro_name, (long) max_int); + } C_ms_par(fbytes); /* # bytes for formals */ if (sp_occurred[SP_SETJMP]) { /* indicate use of "setjmp" */ options['n'] = 1; @@ -294,6 +298,10 @@ end_proc(fbytes) #endif LocalFinish(); C_end(nbytes); + if (nbytes > max_int) { + error("%s has more than %ld bytes of local variables", + pro_name, (long) max_int); + } options['n'] = optionsn; }