From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ea99a8822847633f,start X-Google-Attributes: gid103376,public From: wayne lydecker Subject: stack frame too large Date: 2000/11/10 Message-ID: <3A0C9FB8.9EBC9A7F@pacbell.net>#1/1 X-Deja-AN: 692246972 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cts.com X-Trace: thoth.cts.com 973905792 4305 63.207.143.101 (11 Nov 2000 01:23:12 GMT) Organization: CTSnet Internet Services Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-11-10T00:00:00+00:00 List-Id: We are experiencing a rather severe error using Alsys on HP. Evidently we are overflowing a stack frame which is causing a corrupted heap. Because I am playing with GNAT, I decided to see if I can get more information using that compiler while using the -fstack-check switch. GNAT does indeed complain: frame size too large for reliable stack checking try reducing the number of local variables I have been able to distill the error down to a very fundamental set of code. If I call a procedure that calls a function to return an array of 2000 integers, I get the error. 1000 integers works fine. If anyone can shed light on this unusual problem, I would be most grateful. I compile it with: gnatmake -g test -cargs -fstack-check Here's the exact warning from GNAT: fifo_queue.adb: In function `fifo_queue__deque': fifo_queue.adb:11: warning: frame size too large for reliable stack checking fifo_queue.adb:11: warning: try reducing the number of local variables Here's the code (suitable for gnatchop). Thanks, -- Wayne. package Fifo_Queue is type Data_Type is array (1..2000) of Integer; procedure Deque (Data : out Data_Type); end Fifo_Queue; package body Fifo_Queue is My_Data : Data_Type := (others => 0); function Deque return Data_Type is begin return My_Data; end Deque; procedure Deque (Data : out Data_Type) is begin Data := Deque; -- Line 11 as reported in warning. end Deque; end Fifo_Queue; with fifo_queue; procedure test is begin null; end;