|
From: <oli...@on...> - 2004-09-03 22:18:06
|
> What do you mean by "instances" exactly? How are you identifying > these instances? I meant, that it's one process all the time and suddenly I have like 8 processes running. > The point is that valgrind won"t randomly decide to start a few > extra copies your program. If your program forks then you will > appear to have multiple valgrind"s running, one for each process > that you have forked. The program doesn't fork anywhere. if this would be wanted behavior, I would have reported it at all. > Likewise if you are using ps then what you may be seeing is actually > threads rather than processes. You will always have two threads when > running under valgrind, and one more will appear each time you create > a thread in your program. Well...using "ps -x" only shows me the processes and the valgrind'd program has only one process running. And I don't get those multiple threads with addrcheck or helgrind. With addrcheck it runs for hours without any problem. > As to that error, that looks like a problem in your program. Valgrind > is simply informing you of the details when your programs dies because > of a bad memory access. I also thought so, but I debugged it and everything is fine. But when running it in valgrind with memcheck the memory gets corrupted. I used --db-attach=yes and when I got to that error and looked in the debugger the memory wasn't right. Running it without valgrind or with another tool I don't have that program. The same code also gets executed a lot of times before. And the code, that is bad is just creating a string object (string x = y) and the given string is alright. I will have a much closer look at it over the weekend, if I actually get to it. Maybe some more details will surface. |