From: Nicholas N. <nj...@ca...> - 2003-06-17 14:29:02
|
On Tue, 17 Jun 2003, Geert Fannes wrote: > hello, i have a monolythic C++ program (3766634 bytes) for which > valgrind gives errors like beneath. i don't know what these errors mean, > but i don't trust the threaded stuff in it, since my program is > non-threaded (i even don't exactly know what a threaded program is, i'm > guessing that it has to do with forking etc.) Threads aren't quite the same as forking, although there are similarities. But that doesn't matter in this case; you can ignore the "thread 1's stack" bit, if your program doesn't use threads then everything runs in a single thread which has the number 1. The errors mean your program is writing to memory it shouldn't; since this memory is on your program's stack, maybe you're writing beneath the stack pointer... maybe you are overrunning the bounds of a stack-allocated array? > where can i find more information about the origin of the error and the > error itself (i'm guessing that 15180 is some error code)? did someone > have the same error? is my program too big? why is the --num-caller not > working for this error, while it is for others? > > valgrind --leak-check=yes --num-callers=30 ./test > > ==15180== Invalid write of size 1 > ==15180== at 0x80C3FDC: GRV::bLoadRVsFromFile(GDLLpGBaseObject*, char > const*, char const*, bool) (GRV.cpp:346) > ==15180== Address 0xBFB388EF is on thread 1's stack > ==15180== > ==15180== Invalid write of size 4 > ==15180== at 0x80C3FE2: GRV::bLoadRVsFromFile(GDLLpGBaseObject*, char > const*, char const*, bool) (GRV.cpp:357) > ==15180== Address 0xBFB388E4 is on thread 1's stack 15180 is the process ID number. I'm not sure why you don't get a larger stack trace, that is a bit odd. But at least you have the exact lines at which the invalid writes are happening, hopefully that's enough to find them? N |