comp.lang.ada
 help / color / mirror / Atom feed
* Stack Problem?
@ 2003-01-16 10:10 Petter Fryklund
  2003-01-16 12:56 ` David C. Hoos, Sr.
  2003-01-16 20:52 ` Kevin Cline
  0 siblings, 2 replies; 7+ messages in thread
From: Petter Fryklund @ 2003-01-16 10:10 UTC (permalink / raw)


We are getting a SEGV out of realfree (/libc.so.1) call stack is

realfree
cleanfree
_malloc_unlocked
malloc
calloc
netconfig_dup
__rpc_getconfigip
gethostbyname_r
gnat__sockets__get_host_by_name
....

Parameters sent from gnat__... seems to be alright. I've no idea about
the library, since it's not compiled with debug info.

I suspect that we've exceed the stack limit, but I can't find a way to
verify that. How can I do that? How can I even find out the stack
size? For heap usage there is gmem is there any similar for stacks?

Any suggestions?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stack Problem?
  2003-01-16 10:10 Petter Fryklund
@ 2003-01-16 12:56 ` David C. Hoos, Sr.
  2003-01-16 20:52 ` Kevin Cline
  1 sibling, 0 replies; 7+ messages in thread
From: David C. Hoos, Sr. @ 2003-01-16 12:56 UTC (permalink / raw)


It is impossible to answer your question because the answer depends
on a number of factors of which you haven't informed us -- gnat version,
OS and version - shell and version, at least.

There is a wealth of information about the gnat-dependent part of your
question in both the GNAT User Guide, and the GNAT Reference Manual
included with GNAT distributions.

The shell environment in which you execute your programs may provide
control over how much stack and heap is available to a user program --
e.g., in the tcsh shell the limit and unlimit commands.

----- Original Message ----- 
From: "Petter Fryklund" <petter.fryklund.konsult@dynamics.saab.se>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: January 16, 2003 4:10 AM
Subject: Stack Problem?


> We are getting a SEGV out of realfree (/libc.so.1) call stack is
> 
> realfree
> cleanfree
> _malloc_unlocked
> malloc
> calloc
> netconfig_dup
> __rpc_getconfigip
> gethostbyname_r
> gnat__sockets__get_host_by_name
> ....
> 
> Parameters sent from gnat__... seems to be alright. I've no idea about
> the library, since it's not compiled with debug info.
> 
> I suspect that we've exceed the stack limit, but I can't find a way to
> verify that. How can I do that? How can I even find out the stack
> size? For heap usage there is gmem is there any similar for stacks?
> 
> Any suggestions?
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
> 
>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stack Problem?
  2003-01-16 10:10 Petter Fryklund
  2003-01-16 12:56 ` David C. Hoos, Sr.
@ 2003-01-16 20:52 ` Kevin Cline
  2003-01-20 10:05   ` Petter Fryklund
  1 sibling, 1 reply; 7+ messages in thread
From: Kevin Cline @ 2003-01-16 20:52 UTC (permalink / raw)


petter.fryklund.konsult@dynamics.saab.se (Petter Fryklund) wrote in message news:<f74cb448.0301160210.3fa1bd66@posting.google.com>...
> We are getting a SEGV out of realfree (/libc.so.1) call stack is
> 
> realfree
> cleanfree
> _malloc_unlocked
> malloc
> calloc
> netconfig_dup
> __rpc_getconfigip
> gethostbyname_r
> gnat__sockets__get_host_by_name
> ....
> 
> Parameters sent from gnat__... seems to be alright. I've no idea about
> the library, since it's not compiled with debug info.
> 
> I suspect that we've exceed the stack limit, but I can't find a way to
> verify that. 

Crashes below malloc are almost always caused by heap
corruption.  Your code or some library code has probably corrupted 
the heap by freeing the same object twice, or by modifying an object
after it was deallocated.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stack Problem?
  2003-01-16 20:52 ` Kevin Cline
@ 2003-01-20 10:05   ` Petter Fryklund
  2003-01-21  7:06     ` Kevin Cline
  0 siblings, 1 reply; 7+ messages in thread
From: Petter Fryklund @ 2003-01-20 10:05 UTC (permalink / raw)


The problem was really an erronous free of an instance of a global
data array.

But for future ... what can we do about monitoring stack usage in
general. We're using several different GNAT's but this specific is
3.15 on Solaris 5.5, 5.6 or 5.8.


kcline17@hotmail.com (Kevin Cline) wrote in message news:<ba162549.0301161252.17eefbbe@posting.google.com>...
> petter.fryklund.konsult@dynamics.saab.se (Petter Fryklund) wrote in message news:<f74cb448.0301160210.3fa1bd66@posting.google.com>...
> > We are getting a SEGV out of realfree (/libc.so.1) call stack is
> > 
> > realfree
> > cleanfree
> > _malloc_unlocked
> > malloc
> > calloc
> > netconfig_dup
> > __rpc_getconfigip
> > gethostbyname_r
> > gnat__sockets__get_host_by_name
> > ....
> > 
> > Parameters sent from gnat__... seems to be alright. I've no idea about
> > the library, since it's not compiled with debug info.
> > 
> > I suspect that we've exceed the stack limit, but I can't find a way to
> > verify that. 
> 
> Crashes below malloc are almost always caused by heap
> corruption.  Your code or some library code has probably corrupted 
> the heap by freeing the same object twice, or by modifying an object
> after it was deallocated.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stack Problem?
@ 2003-01-20 12:16 David C. Hoos, Sr.
  2003-01-21 17:24 ` Petter Fryklund
  0 siblings, 1 reply; 7+ messages in thread
From: David C. Hoos, Sr. @ 2003-01-20 12:16 UTC (permalink / raw)
  To: comp.lang.ada mail to news gateway

Have you followed the instructions in the GNAT User's Guide, section 3.2.6?

----- Original Message -----
From: "Petter Fryklund" <petter.fryklund.konsult@dynamics.saab.se>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: January 20, 2003 4:05 AM
Subject: Re: Stack Problem?


> The problem was really an erronous free of an instance of a global
> data array.
>
> But for future ... what can we do about monitoring stack usage in
> general. We're using several different GNAT's but this specific is
> 3.15 on Solaris 5.5, 5.6 or 5.8.
>
>
> kcline17@hotmail.com (Kevin Cline) wrote in message
news:<ba162549.0301161252.17eefbbe@posting.google.com>...
> > petter.fryklund.konsult@dynamics.saab.se (Petter Fryklund) wrote in message
news:<f74cb448.0301160210.3fa1bd66@posting.google.com>...
> > > We are getting a SEGV out of realfree (/libc.so.1) call stack is
> > >
> > > realfree
> > > cleanfree
> > > _malloc_unlocked
> > > malloc
> > > calloc
> > > netconfig_dup
> > > __rpc_getconfigip
> > > gethostbyname_r
> > > gnat__sockets__get_host_by_name
> > > ....
> > >
> > > Parameters sent from gnat__... seems to be alright. I've no idea about
> > > the library, since it's not compiled with debug info.
> > >
> > > I suspect that we've exceed the stack limit, but I can't find a way to
> > > verify that.
> >
> > Crashes below malloc are almost always caused by heap
> > corruption.  Your code or some library code has probably corrupted
> > the heap by freeing the same object twice, or by modifying an object
> > after it was deallocated.
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>
>





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stack Problem?
  2003-01-20 10:05   ` Petter Fryklund
@ 2003-01-21  7:06     ` Kevin Cline
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Cline @ 2003-01-21  7:06 UTC (permalink / raw)


petter.fryklund.konsult@dynamics.saab.se (Petter Fryklund) wrote in message news:<f74cb448.0301200205.5cab1bee@posting.google.com>...
> The problem was really an erronous free of an instance of a global
> data array.

Oh.  It's pretty unusual to end up freeing something that was
never allocated at all.  

> But for future ... what can we do about monitoring stack usage in
> general. We're using several different GNAT's but this specific is
> 3.15 on Solaris 5.5, 5.6 or 5.8.

If you have a bit of money to spend, then I recommend Rational Purify.
See http://www.rational.com/products/purify_nt/index.jsp



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Stack Problem?
  2003-01-20 12:16 Stack Problem? David C. Hoos, Sr.
@ 2003-01-21 17:24 ` Petter Fryklund
  0 siblings, 0 replies; 7+ messages in thread
From: Petter Fryklund @ 2003-01-21 17:24 UTC (permalink / raw)


"David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote in message news:<mailman.2.1043065003.12836.comp.lang.ada@ada.eu.org>...
> Have you followed the instructions in the GNAT User's Guide, section 3.2.6?

Yes, I feel that we have.

> 
> ----- Original Message -----
> From: "Petter Fryklund" <petter.fryklund.konsult@dynamics.saab.se>
> Newsgroups: comp.lang.ada
> To: <comp.lang.ada@ada.eu.org>
> Sent: January 20, 2003 4:05 AM
> Subject: Re: Stack Problem?
> 
> 
> > The problem was really an erronous free of an instance of a global
> > data array.
> >
> > But for future ... what can we do about monitoring stack usage in
> > general. We're using several different GNAT's but this specific is
> > 3.15 on Solaris 5.5, 5.6 or 5.8.
> >
> >
> > kcline17@hotmail.com (Kevin Cline) wrote in message
>  news:<ba162549.0301161252.17eefbbe@posting.google.com>...
> > > petter.fryklund.konsult@dynamics.saab.se (Petter Fryklund) wrote in message
>  news:<f74cb448.0301160210.3fa1bd66@posting.google.com>...
> > > > We are getting a SEGV out of realfree (/libc.so.1) call stack is
> > > >
> > > > realfree
> > > > cleanfree
> > > > _malloc_unlocked
> > > > malloc
> > > > calloc
> > > > netconfig_dup
> > > > __rpc_getconfigip
> > > > gethostbyname_r
> > > > gnat__sockets__get_host_by_name
> > > > ....
> > > >
> > > > Parameters sent from gnat__... seems to be alright. I've no idea about
> > > > the library, since it's not compiled with debug info.
> > > >
> > > > I suspect that we've exceed the stack limit, but I can't find a way to
> > > > verify that.
> > >
> > > Crashes below malloc are almost always caused by heap
> > > corruption.  Your code or some library code has probably corrupted
> > > the heap by freeing the same object twice, or by modifying an object
> > > after it was deallocated.
> > _______________________________________________
> > comp.lang.ada mailing list
> > comp.lang.ada@ada.eu.org
> > http://ada.eu.org/mailman/listinfo/comp.lang.ada
> >
> >



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-01-21 17:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20 12:16 Stack Problem? David C. Hoos, Sr.
2003-01-21 17:24 ` Petter Fryklund
  -- strict thread matches above, loose matches on Subject: below --
2003-01-16 10:10 Petter Fryklund
2003-01-16 12:56 ` David C. Hoos, Sr.
2003-01-16 20:52 ` Kevin Cline
2003-01-20 10:05   ` Petter Fryklund
2003-01-21  7:06     ` Kevin Cline

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