By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,376 Members | 1,537 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,376 IT Pros & Developers. It's quick & easy.

Problems with valgrind

P: n/a
Hi

I have been using valgrind to debug a program I have written in C++ and
it has been very helpful in eliminating memory errors/leaks. However, I
just recently discovered a bug and from what I can see it looks like
some kind of memory problem. However, when I run it through valgrind no
errors are reported and the bug seems to be gone! I print some status
from the program and at some point this becomes wrong but when the
program is run through valgrind the status printed is right!

How can valgrind change the output of my program and does this behaviour
give any clues as to what kind of bug I am looking for?

Thanks in advance.

/Andreas

Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Andreas Andersen wrote:
I have been using valgrind to debug a program I have written in C++ and
it has been very helpful in eliminating memory errors/leaks. However, I
just recently discovered a bug and from what I can see it looks like
some kind of memory problem. However, when I run it through valgrind no
errors are reported and the bug seems to be gone! I print some status
from the program and at some point this becomes wrong but when the
program is run through valgrind the status printed is right!

How can valgrind change the output of my program and does this behaviour
give any clues as to what kind of bug I am looking for?


'valgrind' is off-topic here. But we can try to help you with your code.
You just need to read the FAQ and follow its advice. Find a copy of the
"Welcome" message (posted here weekly by Shiva), and take it from there.

V
Jul 22 '05 #2

P: n/a

"Andreas Andersen" <an*****************@daimi.au.dk> schrieb im
Newsbeitrag news:cs***********@news.cybercity.dk...
Hi

I have been using valgrind to debug a program I have written in C++
and it has been very helpful in eliminating memory errors/leaks.
However, I just recently discovered a bug and from what I can see it
looks like some kind of memory problem. However, when I run it
through valgrind no errors are reported and the bug seems to be
gone! I print some status from the program and at some point this
becomes wrong but when the program is run through valgrind the
status printed is right!

How can valgrind change the output of my program and does this
behaviour give any clues as to what kind of bug I am looking for?

Thanks in advance.


This sort of error come 95% from something like:
char a[9]; a[9]='x';
Bitch to find. Hopefully it's very new, so you can check the code you
wrote yesterday.
-Gernot
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.