comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh.plus-bug.bauhaus@maps.futureapps.de>
Subject: Re: Distro with the best Ada development environment?
Date: Thu, 16 Apr 2009 21:11:22 +0200
Date: 2009-04-16T21:11:22+02:00	[thread overview]
Message-ID: <49e782da$0$31871$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <cacde80f-05d1-4cee-bae8-b9c31e0e0adf@o30g2000vbc.googlegroups.com>

Ludovic Brenta wrote:
> On Apr 15, 11:29 am, Georg Bauhaus <rm.dash-bauh...@futureapps.de>
> wrote:
>> Ludovic Brenta schrieb:
>>
>>> Xavier Grave wrote on comp.lang.ada:
>>>> To have a full list, just install a Debian or ask Ludovic Brenta who is
>>>> responsible for Ada in Debian.
>>> There is an overview of most Ada distributions in the Ada Programming
>>> wikibook[1].  Indeed, I am responsible for most of Ada in Debian which
>>> is TTBOMK the only distribution with a consistent policy for Ada.
>> FYI, there are a few, uhm, instabilities in 64bit Debian-based
>> installations (Ubuntu 8.04.2 LTS server, i.e. not Debian),
> 
> There have been reports of breakage in dependencies between Ada
> packages on Ubuntu. As you say, Ubuntu is not Debian.
> 
>> gdb issues, and lo and behold, even a segfault when running
>> 64bit Spark tools.  See also gcc:#39264, Ubuntu:#219342.
> [...]
> 
> I'm curious to know whether or not these bugs also affect Debian 5.0.
> Could you try it?

The spark program SEGFAULTs when run on Debian 5 AMD64 stable.
I used valgrind to look into this and inspecting the output
of valgrind made me think I should set a higher stack size limit.
I did, and the symptom went away. (The default stack size is 8192.)

No idea whether the cause is gone then, too.
(Next thing I'll do is to read more Spark documentation to
see whether stack size is mentioned somewhere.
While GNAT is the compiler used to make spark (and we are told
to prefer allocators with GNAT for larger data objects IIUC)
program analysis puts a heavy load on a computer anyway, so
some stack usage seems plausible. Whatever the meaning of
valgrind's output "Go fix your program!" ;-)

For the record,
$ ulimit -s $((8192 * 128))   # increase stack size limit
$ spark  ... # as before, runs fine now

***

$ file $(which spark)
/home/georg/praxis7p6/bin/spark: ELF 64-bit LSB executable, \
  x86-64, version 1 (SYSV), dynamically linked (uses shared libs), \
  for GNU/Linux 2.6.8, stripped

$
Valgrind running spark with normal stack size limit reports this:

***        Semantic Error    :752: The identifier Ext is either
undeclared or not
           visible at this point. This identifier must appear in a
preceding
           legal global annotation or formal parameter list.
==8032== Warning: client switching stacks?  SP change: 0x7FEEF7BC8 -->
0x7FE8CB450
==8032==          to suppress, use: --max-stackframe=6473592 or greater
==8032== Invalid write of size 4
==8032==    at 0x4B5F63: (within /home/georg/praxis7p6/bin/spark)
==8032==  Address 0x7fe8cb464 is on thread 1's stack
==8032==
==8032== Invalid write of size 8
==8032==    at 0x4B5F6A: (within /home/georg/praxis7p6/bin/spark)
==8032==  Address 0x7fe8cb458 is on thread 1's stack
==8032==
==8032== Invalid write of size 8
==8032==    at 0x4B5F79: (within /home/georg/praxis7p6/bin/spark)
==8032==  Address 0x7febd9d80 is on thread 1's stack
==8032==
==8032== Invalid write of size 8
==8032==    at 0x4B5F81: (within /home/georg/praxis7p6/bin/spark)
==8032==  Address 0x7febd9d88 is on thread 1's stack
==8032==
==8032== Invalid write of size 8
==8032==    at 0x4B5FA0: (within /home/georg/praxis7p6/bin/spark)
==8032==  Address 0x7fe8cb448 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23C28: memset (mc_replace_strmem.c:493)
==8032==  Address 0x7feee8130 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23C2C: memset (mc_replace_strmem.c:493)
==8032==  Address 0x7feee8131 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23C31: memset (mc_replace_strmem.c:493)
==8032==  Address 0x7feee8132 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23C36: memset (mc_replace_strmem.c:493)
==8032==  Address 0x7feee8133 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23C42: memset (mc_replace_strmem.c:493)
==8032==  Address 0x7feee8138 is on thread 1's stack
==8032==
==8032== Invalid read of size 8
==8032==    at 0x4C23C69: memset (mc_replace_strmem.c:493)
==8032==  Address 0x7fe8cb448 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23264: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe43 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C2326D: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe42 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23277: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe41 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23281: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe40 is on thread 1's stack
==8032==
==8032== Invalid write of size 4
==8032==    at 0x4B5FC1: (within /home/georg/praxis7p6/bin/spark)
==8032==  Address 0x7feeefe58 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C23260: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe57 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C23268: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe56 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C23272: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe55 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C2327C: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe54 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C23318: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe60 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C2331C: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7fe8cb490 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C2331F: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe61 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23324: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7fe8cb491 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C23328: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe62 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C2332D: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7fe8cb492 is on thread 1's stack
==8032==
==8032== Invalid read of size 1
==8032==    at 0x4C23331: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7feeefe63 is on thread 1's stack
==8032==
==8032== Invalid write of size 1
==8032==    at 0x4C23336: memcpy (mc_replace_strmem.c:402)
==8032==  Address 0x7fe8cb493 is on thread 1's stack
==8032==
==8032== More than 10000000 total errors detected.  I'm not reporting
any more.
==8032== Final error counts will be inaccurate.  Go fix your program!
==8032== Rerun with --error-limit=no to disable this cutoff.  Note
==8032== that errors may occur in your program without prior warning from
==8032== Valgrind, because errors are no longer being displayed.
==8032==
==8032== Can't extend stack to 0x7FE769E90 during signal delivery for
thread 1:
==8032==   no stack segment
==8032==
==8032== Process terminating with default action of signal 11 (SIGSEGV)
==8032==  Access not within mapped region at address 0x7FE769E90
==8032==    at 0x4A46C5: (within /home/georg/praxis7p6/bin/spark)
==8032==
==8032== Process terminating with default action of signal 11 (SIGSEGV)
==8032==  Access not within mapped region at address 0x7FE76A6F8
==8032==    at 0x4A1D310: _vgnU_freeres (vg_preloaded.c:56)
==8032==
==8032== ERROR SUMMARY: 10000000 errors from 28 contexts (suppressed: 8
from 1)
==8032== malloc/free: in use at exit: 27,628 bytes in 715 blocks.
==8032== malloc/free: 734 allocs, 19 frees, 31,200 bytes allocated.
==8032== For counts of detected errors, rerun with: -v
==8032== searching for pointers to 715 not-freed blocks.
==8032== checked 8,188,320 bytes.
==8032==
==8032== LEAK SUMMARY:
==8032==    definitely lost: 0 bytes in 0 blocks.
==8032==      possibly lost: 0 bytes in 0 blocks.
==8032==    still reachable: 27,628 bytes in 715 blocks.
==8032==         suppressed: 0 bytes in 0 blocks.
==8032== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault
georg@was-denn:~/src/topsort/BUG$




  parent reply	other threads:[~2009-04-16 19:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 22:53 Distro with the best Ada development environment? Dimonax
2009-04-14 23:26 ` xavier grave
2009-04-15  6:32   ` Ludovic Brenta
2009-04-15  9:29     ` Georg Bauhaus
2009-04-15 14:32       ` Ludovic Brenta
2009-04-15 22:47         ` Georg Bauhaus
2009-04-16 19:11         ` Georg Bauhaus [this message]
2009-04-17 13:49           ` Alex R. Mosteo
2009-04-17 14:58             ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox