|
From: <Mi...@gm...> - 2005-02-19 15:39:51
|
Hi, I am working on a large C++ application (ca. 15.000 LOC), and only recently got onto valgrind. The app runs nicely since years on Linux and Solaris, but when trying to port it to MinGW on Windows, it SIGSEGVs right on startup. So I tried to hunt down the bug with valgrind, suspecting it might be a memory problem. But the error messages valgrind produces are confusing me, I cannot see any reason. Example 1: assignments with declaration of local variables - this line (in fact the very first in my app) unsigned int testanz = 0; causes valgrind to issue ==4138== Invalid write of size 4 ==4138== at 0x804ED59: main (runner.cc:22) ==4138== by 0x4030E856: __libc_start_main (in /lib/libc.so.6) ==4138== by 0x8049140: (within /home/micha/e5/runner) ==4138== Address 0xBFFFF32C is not stack'd, malloc'd or free'd Example 2: libc usage: any use of a mem...() or str...() libc function generates an error like ==6300== Invalid read of size 4 ==6300== at 0x1BA79CB2: memset (in /lib/libc.so.6) ==6300== by 0x1BA12856: __libc_start_main (in /lib/libc.so.6) ==6300== by 0x8049170: (within /home/micha/e5/runner) ==6300== Address 0x5290FDD0 is on thread 1's stack What does it all mean to me? Miq. -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl |