|
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
|