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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: hreba Newsgroups: comp.lang.ada Subject: Re: storage error: stack overflow Date: Wed, 12 Aug 2015 21:55:35 -0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net qZPF96pAQhiqHwKaE7oX5QfULiLqI3pF5u4ouRQgHMnQDjkLYh Cancel-Lock: sha1:Gvc3hDktnQ88EM0MnqGNoBSp+AM= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:27425 Date: 2015-08-12T21:55:35-03:00 List-Id: On 08/12/2015 07:57 AM, Simon Wright wrote: > hreba writes: > >> I am developing a program on 3 computers in parallel (depending on >> where I am). On 2 of them the executable works as expected, on one I >> get: >> >> raised PROGRAM_ERROR ; adjust/finalize raised STORAGE_ERROR: stack >> overflow (or erroneous memory access) > >> How can I find out what is wrong? > > Use the debugger and 'catch exception storage_error'? > > I'd think it's more likely an erroneous memory access than a stack > overflow. As I remember, GNAT catches a SIGSEGV and does its best to > work out what the problem was, but at that level it can be hard to tell. > The name of my program is "sos". Calling it with gdb: ----------------------------------------------------- ~/Projects/SOS/Exec $ gdb sos Reading symbols from sos...done (gdb) catch exception storage_error Unable to insert catchpoint. Try to start the program first. (gdb) run Starting program: /home/frank/Projects/SOS/Exec/sos [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1" (process:2365): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale Program received signal SIGSEGV, segmentation fault. 0x00007ffff627a1a0 in ada.strings.unbounded.reference () from /usr/lib/x86_64-linux-gnu/libgnat-4.6.so.1 (gdb) catch exception storage_error Your Ada runtime appears to be missing some debug information. Cannot insert Ada exception catchpoint in this configuration. --------------------------------------------------------- I compiled my program for debugging, but the debug information perhaps is missing in libgnat. Anyway, the problem has to do with Ada.Strings.Unbounded. For more, see my answer to Emmanuel Briot. -- Frank Hrebabetzky +55 / 48 / 3235 1106 Florianopolis, Brazil