* Nightmare pointer problem
@ 1999-01-21 5:00 Brian Charlton
1999-01-21 5:00 ` Phil Edwards
1999-01-22 5:00 ` Jeff Sullivan
0 siblings, 2 replies; 3+ messages in thread
From: Brian Charlton @ 1999-01-21 5:00 UTC (permalink / raw)
We have developed a very large C++ application program on a DEC ALPHA
runnning OSF1, which appears to be working fine 50% of the time.
However, now and then it crashes with a segmentation violation. When we
compile for debug the program will crash in a different location,
usually in library functions which we only have the binaries for.
Some data has become corrupted, perhaps an object is being deleted
twice?
I am aware of tools, available for the PC, which fill unused memory with
zeros to help show up bad pointers sooner.
Is anyone aware of a tool to assist with this standard bug on a DEC
ALPHA running DEC C++?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nightmare pointer problem
1999-01-21 5:00 Nightmare pointer problem Brian Charlton
@ 1999-01-21 5:00 ` Phil Edwards
1999-01-22 5:00 ` Jeff Sullivan
1 sibling, 0 replies; 3+ messages in thread
From: Phil Edwards @ 1999-01-21 5:00 UTC (permalink / raw)
Brian Charlton <brian.charlton@vegauk.co.uk> wrote:
+ Some data has become corrupted, perhaps an object is being deleted
+ twice?
In a programming newsgroup, this is where we would usually insert the
pitch for ANSI/ISO Standard utilities like the auto_ptr<> template and
other reference-counting mechanisms to help warn off problems like these.
+ I am aware of tools, available for the PC, which fill unused memory with
+ zeros to help show up bad pointers sooner.
+
+ Is anyone aware of a tool to assist with this standard bug on a DEC
+ ALPHA running DEC C++?
It's been a while since I last worked with cxx, but you should check the
documentation and see if there aren't just some command-line options to
affect things like this.
Send me an email if you run into any major problems; I'll see what I
can do to help.
Luck++;
=> If you post a followup, PLEASE don't email a copy to me. I read news
often enough that replying to things twice is annoying. But thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Nightmare pointer problem
1999-01-21 5:00 Nightmare pointer problem Brian Charlton
1999-01-21 5:00 ` Phil Edwards
@ 1999-01-22 5:00 ` Jeff Sullivan
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Sullivan @ 1999-01-22 5:00 UTC (permalink / raw)
Brian Charlton wrote:
>
> We have developed a very large C++ application program on a DEC ALPHA
> runnning OSF1, which appears to be working fine 50% of the time.
> However, now and then it crashes with a segmentation violation. When we
> compile for debug the program will crash in a different location,
> usually in library functions which we only have the binaries for.
>
> Some data has become corrupted, perhaps an object is being deleted
> twice?
>
> I am aware of tools, available for the PC, which fill unused memory with
> zeros to help show up bad pointers sooner.
What version of the compiler and OS are you using?
There are a few of things that you can try.
The Digital C++ compiler contains a -trapuv switch (similar to
DEC C), which initializes all uninitialized data to some "known
bad" value. If the problem is due to an uninitialized pointer
(and hence unpredictable results), this will make the problem
much more reproducible. See man cxx(1) for details.
There is a tool called ATOM third degree that is a heap usage
and leak profiler, and memory-access error checker for C and
C++ programs. What you do is ATOMize the application and run it
as you normally would. It will produce a log file of potential
memory overwrites, etc. It's worked for me in the past to debug
just this type of problem. See man third(1) for details.
You can also enable more diagnostics in the compiler itself,
either by enabling more messages or compiling in a stricter
mode. See the -msg_enable and -std flags in the cxx(1) man
page. These are applicable for DIGITAL C++ V6.0 and later.
Hope it helps.
-Jeff
--
Jeff Sullivan | Compaq Computer Corp | jps@zk3.dec.com
DEC C and C++ | Nashua, NH ZK3-2/X29 | sullivan@zko.dec.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-01-22 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-21 5:00 Nightmare pointer problem Brian Charlton
1999-01-21 5:00 ` Phil Edwards
1999-01-22 5:00 ` Jeff Sullivan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox