|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-11-22 14:57 UTC] iliaa@php.net
[2007-11-22 15:20 UTC] poletto at jeuxvideo dot com
[2007-11-22 16:40 UTC] iliaa@php.net
[2007-11-22 17:09 UTC] poletto at jeuxvideo dot com
[2008-07-03 17:02 UTC] uw@php.net
[2008-09-15 00:54 UTC] johannes@php.net
[2008-09-22 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 03:00:01 2025 UTC |
Description: ------------ There were some crashes with 5.2.4 when using pdo, so i've tried out 5.2.5 that seems to have fixed this crashes. Just to make sure there was no problem, i've tried to valgrind the command line program on a simple script using pdo. There are a few memory errors (this can make crashes occur). Note that the leaks are due to the kernel 2.4 threads (so, ignore them). Reproduce code: --------------- <?php $dbh = new PDO('mysql:host=host;dbname=db', 'user', 'pass', array(PDO::ATTR_PERSISTENT => true)); ?> Expected result: ---------------- No memory errors Actual result: -------------- Valgrind's output > valgrind -q --leak-check=full --show-reachable=yes /usr/local/src/php-5.2.5/sapi/cli/php test_pdo.php ==10313== Invalid read of size 4 ==10313== at 0x40B29BD: my_strdup (in /usr/local/MySQL-5.0.45/lib/libmysqlclient.so.15) ==10313== by 0x40D61D5: mysql_real_connect (in /usr/local/MySQL-5.0.45/lib/libmysqlclient.so.15) ==10313== by 0x80F384C: pdo_mysql_handle_factory (mysql_driver.c:553) ==10313== by 0x80EAC76: zim_PDO_dbh_constructor (pdo_dbh.c:372) ==10313== by 0x8237479: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==10313== by 0x8236D44: execute (zend_vm_execute.h:92) ==10313== by 0x8220018: zend_execute_scripts (zend.c:1134) ==10313== by 0x81ED74F: php_execute_script (main.c:2004) ==10313== by 0x827A9B1: main (php_cli.c:1140) ==10313== Address 0x471F388 is 8 bytes inside a block of size 9 alloc'd ==10313== at 0x401A826: malloc (vg_replace_malloc.c:149) ==10313== by 0x449A33F: strdup (in /lib/i686/libc-2.3.2.so) ==10313== by 0x80EAB51: zim_PDO_dbh_constructor (pdo_dbh.c:358) ==10313== by 0x8237479: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==10313== by 0x8236D44: execute (zend_vm_execute.h:92) ==10313== by 0x8220018: zend_execute_scripts (zend.c:1134) ==10313== by 0x81ED74F: php_execute_script (main.c:2004) ==10313== by 0x827A9B1: main (php_cli.c:1140) ==10313== ==10313== Invalid read of size 4 ==10313== at 0x40B1BC2: scramble (in /usr/local/MySQL-5.0.45/lib/libmysqlclient.so.15) ==10313== by 0x40D654D: mysql_real_connect (in /usr/local/MySQL-5.0.45/lib/libmysqlclient.so.15) ==10313== by 0x80F384C: pdo_mysql_handle_factory (mysql_driver.c:553) ==10313== by 0x80EAC76: zim_PDO_dbh_constructor (pdo_dbh.c:372) ==10313== by 0x8237479: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==10313== by 0x8236D44: execute (zend_vm_execute.h:92) ==10313== by 0x8220018: zend_execute_scripts (zend.c:1134) ==10313== by 0x81ED74F: php_execute_script (main.c:2004) ==10313== by 0x827A9B1: main (php_cli.c:1140) ==10313== Address 0x471F388 is 8 bytes inside a block of size 9 alloc'd ==10313== at 0x401A826: malloc (vg_replace_malloc.c:149) ==10313== by 0x449A33F: strdup (in /lib/i686/libc-2.3.2.so) ==10313== by 0x80EAB51: zim_PDO_dbh_constructor (pdo_dbh.c:358) ==10313== by 0x8237479: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==10313== by 0x8236D44: execute (zend_vm_execute.h:92) ==10313== by 0x8220018: zend_execute_scripts (zend.c:1134) ==10313== by 0x81ED74F: php_execute_script (main.c:2004) ==10313== by 0x827A9B1: main (php_cli.c:1140) ==10313== ==10313== Invalid read of size 4 ==10313== at 0x40B15E1: scramble_323 (in /usr/local/MySQL-5.0.45/lib/libmysqlclient.so.15) ==10313== by 0x40D66F3: mysql_real_connect (in /usr/local/MySQL-5.0.45/lib/libmysqlclient.so.15) ==10313== by 0x80F384C: pdo_mysql_handle_factory (mysql_driver.c:553) ==10313== by 0x80EAC76: zim_PDO_dbh_constructor (pdo_dbh.c:372) ==10313== by 0x8237479: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==10313== by 0x8236D44: execute (zend_vm_execute.h:92) ==10313== by 0x8220018: zend_execute_scripts (zend.c:1134) ==10313== by 0x81ED74F: php_execute_script (main.c:2004) ==10313== by 0x827A9B1: main (php_cli.c:1140) ==10313== Address 0x471F388 is 8 bytes inside a block of size 9 alloc'd ==10313== at 0x401A826: malloc (vg_replace_malloc.c:149) ==10313== by 0x449A33F: strdup (in /lib/i686/libc-2.3.2.so) ==10313== by 0x80EAB51: zim_PDO_dbh_constructor (pdo_dbh.c:358) ==10313== by 0x8237479: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:200) ==10313== by 0x8236D44: execute (zend_vm_execute.h:92) ==10313== by 0x8220018: zend_execute_scripts (zend.c:1134) ==10313== by 0x81ED74F: php_execute_script (main.c:2004) ==10313== by 0x827A9B1: main (php_cli.c:1140) ==10313== ==10313== ==10313== 28 bytes in 1 blocks are still reachable in loss record 1 of 4 ==10313== at 0x401A826: malloc (vg_replace_malloc.c:149) ==10313== by 0x400B875: _dl_map_object_deps (in /lib/ld-2.3.2.so) ==10313== by 0x4532DBA: dl_open_worker (in /lib/i686/libc-2.3.2.so) ==10313== by 0x400C895: _dl_catch_error (in /lib/ld-2.3.2.so) ==10313== by 0x45329AE: _dl_open (in /lib/i686/libc-2.3.2.so) ==10313== by 0x45347C7: do_dlopen (in /lib/i686/libc-2.3.2.so) ==10313== by 0x400C895: _dl_catch_error (in /lib/ld-2.3.2.so) ==10313== by 0x453468D: __libc_dlopen_mode (in /lib/i686/libc-2.3.2.so) ==10313== by 0x4512C30: __nss_lookup_function (in /lib/i686/libc-2.3.2.so) ==10313== by 0x451287A: __nss_lookup (in /lib/i686/libc-2.3.2.so) ==10313== by 0x4514616: __nss_services_lookup (in /lib/i686/libc-2.3.2.so) ==10313== by 0x4517C61: getservbyname_r@@GLIBC_2.1.2 (in /lib/i686/libc-2.3.2.so) ==10313== ==10313== ==10313== 68 bytes in 1 blocks are possibly lost in loss record 2 of 4 ==10313== at 0x401BC54: calloc (vg_replace_malloc.c:279) ==10313== by 0x400EBE8: _dl_allocate_tls_storage (in /lib/ld-2.3.2.so) ==10313== by 0x400EDD8: _dl_allocate_tls (in /lib/ld-2.3.2.so) ==10313== by 0x43D756B: __pthread_initialize_minimal (in /lib/i686/libpthread-0.10.so) ==10313== by 0x43D4205: (within /lib/i686/libpthread-0.10.so) ==10313== by 0x43D3C52: (within /lib/i686/libpthread-0.10.so) ==10313== by 0x400CC51: _dl_init (in /lib/ld-2.3.2.so) ==10313== by 0x4000C5C: (within /lib/ld-2.3.2.so) ==10313== ==10313== ==10313== 520 bytes in 1 blocks are still reachable in loss record 3 of 4 ==10313== at 0x401BC54: calloc (vg_replace_malloc.c:279) ==10313== by 0x400EAF7: _dl_tls_setup (in /lib/ld-2.3.2.so) ==10313== by 0x43D755C: __pthread_initialize_minimal (in /lib/i686/libpthread-0.10.so) ==10313== by 0x43D4205: (within /lib/i686/libpthread-0.10.so) ==10313== by 0x43D3C52: (within /lib/i686/libpthread-0.10.so) ==10313== by 0x400CC51: _dl_init (in /lib/ld-2.3.2.so) ==10313== by 0x4000C5C: (within /lib/ld-2.3.2.so) ==10313== ==10313== ==10313== 1,288 bytes in 1 blocks are possibly lost in loss record 4 of 4 ==10313== at 0x401BE0C: memalign (vg_replace_malloc.c:332) ==10313== by 0x400EBA1: _dl_allocate_tls_storage (in /lib/ld-2.3.2.so) ==10313== by 0x400EDD8: _dl_allocate_tls (in /lib/ld-2.3.2.so) ==10313== by 0x43D756B: __pthread_initialize_minimal (in /lib/i686/libpthread-0.10.so) ==10313== by 0x43D4205: (within /lib/i686/libpthread-0.10.so) ==10313== by 0x43D3C52: (within /lib/i686/libpthread-0.10.so) ==10313== by 0x400CC51: _dl_init (in /lib/ld-2.3.2.so) ==10313== by 0x4000C5C: (within /lib/ld-2.3.2.so)