|
From: Diego T. <dt...@co...> - 2003-12-30 16:25:31
|
It's normal that valgrind(2.1.0, debian unstable) exits like these (with this error msg) ?
==31011== Invalid read of size 1
==31011== at 0x40385546: __GI__dl_close (dl-close.c:122)
==31011== by 0x403863CA: do_dlclose (dl-libc.c:96)
==31011== by 0x4000BF15: _dl_catch_error (in /lib/ld-2.3.2.so)
==31011== by 0x4038630D: dlerror_run (dl-libc.c:42)
==31011== Address 0x1E7 is not stack'd, malloc'd or free'd
==31011==
==31011== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==31011== Address not mapped to object at address 0x1E7
==31011== at 0x40385546: __GI__dl_close (dl-close.c:122)
==31011== by 0x403863CA: do_dlclose (dl-libc.c:96)
==31011== by 0x4000BF15: _dl_catch_error (in /lib/ld-2.3.2.so)
==31011== by 0x4038630D: dlerror_run (dl-libc.c:42)
==31011==
==31011== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1)
==31011== malloc/free: in use at exit: 1876 bytes in 9 blocks.
==31011== malloc/free: 44 allocs, 35 frees, 4119 bytes allocated.
==31011== For a detailed leak analysis, rerun with: --leak-check=yes
==31011== For counts of detected errors, rerun with: -v
Segmentation fault
The test program is the following:
# cat tests_mysql.c
#include <mysql/mysql.h>
int main(int argc, char *argv[]) {
MYSQL * mysql_dbh;
mysql_dbh = mysql_init(0);
mysql_close(mysql_dbh);
return 0;
}
--
-- gnupg keyfingerprint -- 48AF 5BF9 8F54 2966 64CC 2327 7CD0 DD91 B09D 5799
-- Use of a keyboard or mouse may be linked to serious injuries or disorders.
Diego Torres - dtorres at anthalia dot org - Madrid / España
|
|
From: Jeremy F. <je...@go...> - 2004-01-03 22:46:00
|
On Tue, 2003-12-30 at 08:25, Diego Torres wrote: > It's normal that valgrind(2.1.0, debian unstable) exits like these (with this error msg) ? > > ==31011== Invalid read of size 1 > ==31011== at 0x40385546: __GI__dl_close (dl-close.c:122) > ==31011== by 0x403863CA: do_dlclose (dl-libc.c:96) > ==31011== by 0x4000BF15: _dl_catch_error (in /lib/ld-2.3.2.so) > ==31011== by 0x4038630D: dlerror_run (dl-libc.c:42) > ==31011== Address 0x1E7 is not stack'd, malloc'd or free'd > ==31011== > ==31011== Process terminating with default action of signal 11 (SIGSEGV): dumping core > ==31011== Address not mapped to object at address 0x1E7 > ==31011== at 0x40385546: __GI__dl_close (dl-close.c:122) > ==31011== by 0x403863CA: do_dlclose (dl-libc.c:96) > ==31011== by 0x4000BF15: _dl_catch_error (in /lib/ld-2.3.2.so) > ==31011== by 0x4038630D: dlerror_run (dl-libc.c:42) > ==31011== > ==31011== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1) > ==31011== malloc/free: in use at exit: 1876 bytes in 9 blocks. > ==31011== malloc/free: 44 allocs, 35 frees, 4119 bytes allocated. > ==31011== For a detailed leak analysis, rerun with: --leak-check=yes > ==31011== For counts of detected errors, rerun with: -v > Segmentation fault Hm, this works for me here, so I think it's version-specific. Could you run it again, with --num-callers=10? Also, what's the full version of glibc? J |
|
From: Diego T. <dt...@co...> - 2004-01-04 02:45:46
|
On Sat, Jan 03, 2004 at 02:45:58PM -0800, Jeremy Fitzhardinge wrote: > Hm, this works for me here, so I think it's version-specific. Could you > run it again, with --num-callers=10? Also, what's the full version of > glibc? Some version info: Version of libc6 is from debian package 2.3.2.ds1-10, that provides glibc-2.3.2.ds1-10 (that is the current libc6 from debian unstable) reran with --num-callers=10 shows: ==30929== For more details, rerun with: -v ==30929== ==30929== Invalid read of size 1 ==30929== at 0x4037A546: __GI__dl_close (dl-close.c:122) ==30929== by 0x4037B3CA: do_dlclose (dl-libc.c:96) ==30929== by 0x4000BF15: _dl_catch_error (in /lib/ld-2.3.2.so) ==30929== by 0x4037B30D: dlerror_run (dl-libc.c:42) ==30929== by 0x4037E96C: free_mem (nsswitch.c:763) ==30929== by 0x4037E7F4: __GI___libc_freeres (set-freeres.c:49) ==30929== by 0x4016F832: vgPlain___libc_freeres_wrapper (vg_intercept.c:172) ==30929== by 0x4029E927: __GI_exit (exit.c:82) ==30929== by 0x40288DAD: __libc_start_main (libc-start.c:245) ==30929== by 0x80483F0: ??? (start.S:102) ==30929== Address 0x1E7 is not stack'd, malloc'd or free'd ==30929== ==30929== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==30929== Address not mapped to object at address 0x1E7 ==30929== at 0x4037A546: __GI__dl_close (dl-close.c:122) ==30929== by 0x4037B3CA: do_dlclose (dl-libc.c:96) ==30929== by 0x4000BF15: _dl_catch_error (in /lib/ld-2.3.2.so) ==30929== by 0x4037B30D: dlerror_run (dl-libc.c:42) ==30929== by 0x4037E96C: free_mem (nsswitch.c:763) ==30929== by 0x4037E7F4: __GI___libc_freeres (set-freeres.c:49) ==30929== by 0x4016F832: vgPlain___libc_freeres_wrapper (vg_intercept.c:172) ==30929== by 0x4029E927: __GI_exit (exit.c:82) ==30929== by 0x40288DAD: __libc_start_main (libc-start.c:245) ==30929== by 0x80483F0: ??? (start.S:102) ==30929== ==30929== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1) ==30929== malloc/free: in use at exit: 1876 bytes in 9 blocks. ==30929== malloc/free: 44 allocs, 35 frees, 4071 bytes allocated. ==1690== For a detailed leak analysis, rerun with: --leak-check=yes ==1690== For counts of detected errors, rerun with: -v Segmentation fault -- -- gnupg keyfingerprint -- 48AF 5BF9 8F54 2966 64CC 2327 7CD0 DD91 B09D 5799 -- Use of a keyboard or mouse may be linked to serious injuries or disorders. Diego Torres - dtorres at anthalia dot org - Madrid / España |