|
From: Jonathan A. Z. <jon...@nu...> - 2004-10-16 22:13:39
|
Hi! Valgrind has really helped me to clean up my code, except one particular leak it's reporting that doesn't report any type of line number or function (at least one that belongs to me). Any ideas on how to track this back, or what it means not to have this information? ==25265== 32704 bytes in 8 blocks are still reachable in loss record 1 of 1 ==25265== at 0x1B904A90: malloc (vg_replace_malloc.c:131) ==25265== by 0x80649F8: my_once_alloc (in /usr/local/dev/dspam/dspam) ==25265== by 0x8064CFF: init_state_maps (in /usr/local/dev/dspam/dspam) ==25265== by 0x8065447: init_available_charsets (in /usr/local/dev/dspam/dspam) |
|
From: Paul L D. <pld...@pl...> - 2004-10-16 22:23:45
|
> function (at least one that belongs to me). Any ideas on how to track > this back, or what it means not to have this information? From what I can ascertain, it means that the module/object code that the function exists in wasn't compiled with debug information, meaning that the best valgrind can do for you is give you the addresses. Paul. -- PLDaniels - Software - Xamime Unix systems Internet Development A.B.N. 19 500 721 806 PGP Public Key at http://www.pldaniels.com/gpg-keys.pld |
|
From: Jonathan A. Z. <jon...@nu...> - 2004-10-16 22:25:59
|
Hmm so if my app has debugging info on (as evidenced by all the other leaks), it's entirely possible that this leak is coming from some other library? Jonathan Paul L Daniels wrote: >>function (at least one that belongs to me). Any ideas on how to track >>this back, or what it means not to have this information? > > > From what I can ascertain, it means that the module/object code that the function exists in wasn't compiled with > debug information, meaning that the best valgrind can do for you is give you the addresses. > > Paul. > > |
|
From: Jonathan A. Z. <jon...@nu...> - 2004-10-16 22:27:14
|
Yup looks like you were right. init_available_charsets is a symbol in libmysqlclient.a Thanks! Paul L Daniels wrote: >>function (at least one that belongs to me). Any ideas on how to track >>this back, or what it means not to have this information? > > > From what I can ascertain, it means that the module/object code that the function exists in wasn't compiled with > debug information, meaning that the best valgrind can do for you is give you the addresses. > > Paul. > > |
|
From: Paul L D. <pld...@pl...> - 2004-10-16 22:39:45
|
On Sat, 16 Oct 2004 18:25:28 -0400 "Jonathan A. Zdziarski" <jon...@nu...> wrote: > Yup looks like you were right. init_available_charsets is a symbol in > libmysqlclient.a Don't be too surprised when you get leaks/errors with libraries outside of your own code. It's rather annoying. That's what the valgrind suppressions are used for, to stop valgrind reporting things you cannot resolve (or choose not to resolve). I remember going nearly insane once when I had a leak in my program but only while running on RH8, turned out to be the supplied regex lib (now I build HS's regex lib in directly to save any further repeats). Paul. -- PLDaniels - Software - Xamime Unix systems Internet Development A.B.N. 19 500 721 806 PGP Public Key at http://www.pldaniels.com/gpg-keys.pld |
|
From: Dimitri Papadopoulos-O. <pap...@sh...> - 2004-10-18 09:25:47
|
> Yup looks like you were right. init_available_charsets is a symbol in > libmysqlclient.a Given the name of the function, this is probably memory that is allocated only once at program start-up and is automatically released by the system when the program stops. Probably nothing to worry about, this would not be a memory leak in the strict sense, that is, memory is not repeatedly leaked when calling the same function. One the other hand, such allocations do cause noise when running a program under a memory debugger such as Valgrind. I would send a bug report to MySQL asking them if it's possible to get rid of this problem - try the latest version of MySQL before reporting the problem. Note that it's sometimes too much trouble fixing such minor issues, so you may have to wait for the next major version, or it may never be fixed at all. For now add this function to your suppressions. Dimitri |
|
From: Marian K. <in...@se...> - 2004-10-23 22:40:33
|
Hello! Precisely the same thing happens to me, but with the difference that the errors are definitely in my code. When I try running valgrind on my C++ code, I get messages like ==6162== Invalid write of size 1 ==6162== at 0x1B90344A: strcpy (in /usr/lib/valgrind/vgpreload_memcheck.so) ==6162== by 0x807F671: ??? ==6162== by 0x1BA4BB0F: __libc_start_main (in /lib/tls/libc.so.6) ==6162== by 0x8049DC0: ??? where no line numbers are given. This is strange, since I compile with g++, with option -g for debug, so the debug info should be generated; and this compilation used to work with valgrind before (say half a year ago, on older config). I do not strip the tables from the code. My systems are: gcc 3.3.4, SuSE 9.2, kernel 2.6.8, valgrind 2.20 and gcc 3.3.1, Mandrake 10.0, kernel 2.6.3, valgrind 2.0, both of them demonstrating the same ¨no-line-number¨ behavior. I also tried to use flags -gstabs and -gstabs+ instead of -g, because I think that the reason is in some strange format of debug info, but none of them helped. Is that a bug in modern versions of g++? Please help me, I need to debug my program urgently. |