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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c19064b1a16e21cb,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Jano Newsgroups: comp.lang.ada Subject: Stack overflow using Xml/Ada Date: Tue, 20 Jul 2004 23:25:26 +0200 Message-ID: X-Trace: news.uni-berlin.de Ct+mniUllI18R+OWiyUBIgHogYpWQgd+1IkV+JQSW4yfYAw60= X-Newsreader: MicroPlanet Gravity v2.50 Xref: g2news1.google.com comp.lang.ada:2291 Date: 2004-07-20T23:25:26+02:00 List-Id: Hi, I'm using the excellent Xml/Ada library to parse a file (incidentally, created too with Xml/Ada). The problem is when I try to parse it back into memory, since I get a stack overflow when calling the Input_Sources.File.Open procedure. I've tracked it a bit and the problem seems to be this declaration in input_sources-file.adb/Fast_Read type Fixed_String is new String (Buf'Range); package Dir_Fast is new Ada.Direct_IO (Fixed_String); Where Buf'Range is the file size. Further inspecting the Direct_IO gnat implementation, it seems that inside the instance a buffer it's declared in the stack, of Fixed_String'Size: Zeroes : System.Storage_Elements.Storage_Array := (1 .. System.Storage_Elements.Storage_Offset (Bytes) => 0); -- Buffer used to fill out partial records. Since my file is some 3MB in size, and the stack I've allocated is 2MB, it fails. I find too restrictive that the file to parse has to be below stack size, so I'm not considering the possibility of increasing stack size as a solution (furthermore I've never succeed to get over 2MB stack size in linux). Has anyone faced this problem? If so, how did you solved it? Thanks in advance, Alex. P.s: BTW, is there some mailing list related to this library?