#28933 [Com]: segfault using mysqli_fetch_array
ID: 28933 Comment by: steve at rueb dot com Reported By: francesco at pnpitalia dot it Status: Open Bug Type: Reproducible crash Operating System: linux gentoo 2q2004 PHP Version: 5CVS-2004-06-26 (dev) New Comment: I am seeing the same behavior with mysqli_fetch_assoc() on i386. MySQL 4.1.3beta PHP 5.0.0 final --with-mysqli --with-zlib --with-dom --with-gdbm Previous Comments: [2004-06-26 12:58:26] francesco at pnpitalia dot it Description: Using mysqli_fetch_array with *all* parameter (result and type) crashes php php -e test_mysqli.php gdb php core (gdb) bt #0 zend_object_store_get_object (zobject=0x2a) at /INSTALL/php/php-src/Zend/zend_objects_API.c:192 #1 0x0051ad48 in php_mysqli_fetch_into_hash (ht=2, return_value=0x2a957b0dd0, this_ptr=0x0, return_value_used=-1073757328, override_flags=0, into_object=0) at /INSTALL/php/php-src/ext/mysqli/mysqli.c:602 #2 0x00522b1f in zif_mysqli_fetch_array (ht=0, return_value=0x7fbfffc3b0, this_ptr=0x2, return_value_used=-1073757328) at /INSTALL/php/php-src/ext/mysqli/mysqli_nonapi.c:183 #3 0x0069fa3b in zend_do_fcall_common_helper (execute_data=0x7fbfffcac0, opline=0x2a957b6360, op_array=0x2a957b1a10) at /INSTALL/php/php-src/Zend/zend_execute.c:2699 #4 0x0069fb8a in zend_do_fcall_handler (execute_data=0x7fbfffcac0, opline=0x2a957b6360, op_array=0x2a957b1a10) at /INSTALL/php/php-src/Zend/zend_execute.c:2828 #5 0x0069c350 in execute (op_array=0x2a957b1a10) at /INSTALL/php/php-src/Zend/zend_execute.c:1391 #6 0x0067cba9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /INSTALL/php/php-src/Zend/zend.c:1061 #7 0x00641f4f in php_execute_script (primary_file=0x7fb100) at /INSTALL/php/php-src/main/main.c:1627 #8 0x006aa3d5 in main (argc=3, argv=0x7fb268) at /INSTALL/php/php-src/sapi/cli/php_cli.c:943 other info: #uname -a Linux db 2.6.7-mm1 #2 SMP Mon Jun 21 11:36:21 CEST 2004 x86_64 5 GNU/Linux #cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 246 stepping: 8 cpu MHz : 1992.117 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips: 3915.77 TLB size: 1088 4K pages clflush size: 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts ttp processor : 1 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 246 stepping: 8 cpu MHz : 1992.117 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips: 3981.31 TLB size: 1088 4K pages clflush size: 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts ttp gcc --version gcc (GCC) 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc --version gcc (GCC) 3.4.0 20040601 (Gentoo Linux 3.4.0-r6, ssp-3.4-2, pie-8.7.6.3) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. mysql --version mysql Ver 14.5 Distrib 5.0.1-alpha, for unknown-linux (x86_64) (also with 4.1.2) system is gentoo linux ~amd64 #making php ./configure \ \ --enable-debug \ \ --prefix=/usr \ --with-apxs2=/usr/local/apache/bin/apxs \ --with-readline --disable-cgi \ --enable-cli --enable-embed \ --with-ndbm=/usr --with-db4=/usr \ --with-mcrypt=/usr --with-mhash=/usr \ --with-ming=/usr --with-gdbm=/usr \ --with-java=/opt/blackdown-jdk-1.4.2_rc1 \ --without-pgsql --with-xpm-dir=/usr/X11R6 \ --with-pdflib=/usr --with-gd \ --enable-gd-native-ttf --with-png \ --with-png-dir=/usr --with-jpeg \ --with-jpeg-dir=/usr --enable-exif \ --with-tiff --with-tiff-dir=/usr \ --with-freetype-dir=/usr --with-ttf=/usr \ --with-t1lib=/usr --with-gettext \ --with-qtdom=/usr/qt/3 --with-pspell=/usr \ --with-openssl=/usr --without-imap \ --without-ldap --with-dom=/usr \ --with-dom-xslt=/usr --with-dom-exslt=/usr \ --without-kerberos --with-pam \ --disable-memory-limit --enable-ipv6 \ --with-curlwrappers
#28933 [Com]: segfault using mysqli_fetch_array
ID: 28933 Comment by: steve at rueb dot com Reported By: francesco at pnpitalia dot it Status: Open Bug Type: Reproducible crash Operating System: linux gentoo 2q2004 PHP Version: 5CVS-2004-06-26 (dev) New Comment: This seems to be fixed in CVS. Previous Comments: [2004-07-17 21:16:19] steve at rueb dot com I am seeing the same behavior with mysqli_fetch_assoc() on i386. MySQL 4.1.3beta PHP 5.0.0 final --with-mysqli --with-zlib --with-dom --with-gdbm [2004-06-26 12:58:26] francesco at pnpitalia dot it Description: Using mysqli_fetch_array with *all* parameter (result and type) crashes php php -e test_mysqli.php gdb php core (gdb) bt #0 zend_object_store_get_object (zobject=0x2a) at /INSTALL/php/php-src/Zend/zend_objects_API.c:192 #1 0x0051ad48 in php_mysqli_fetch_into_hash (ht=2, return_value=0x2a957b0dd0, this_ptr=0x0, return_value_used=-1073757328, override_flags=0, into_object=0) at /INSTALL/php/php-src/ext/mysqli/mysqli.c:602 #2 0x00522b1f in zif_mysqli_fetch_array (ht=0, return_value=0x7fbfffc3b0, this_ptr=0x2, return_value_used=-1073757328) at /INSTALL/php/php-src/ext/mysqli/mysqli_nonapi.c:183 #3 0x0069fa3b in zend_do_fcall_common_helper (execute_data=0x7fbfffcac0, opline=0x2a957b6360, op_array=0x2a957b1a10) at /INSTALL/php/php-src/Zend/zend_execute.c:2699 #4 0x0069fb8a in zend_do_fcall_handler (execute_data=0x7fbfffcac0, opline=0x2a957b6360, op_array=0x2a957b1a10) at /INSTALL/php/php-src/Zend/zend_execute.c:2828 #5 0x0069c350 in execute (op_array=0x2a957b1a10) at /INSTALL/php/php-src/Zend/zend_execute.c:1391 #6 0x0067cba9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /INSTALL/php/php-src/Zend/zend.c:1061 #7 0x00641f4f in php_execute_script (primary_file=0x7fb100) at /INSTALL/php/php-src/main/main.c:1627 #8 0x006aa3d5 in main (argc=3, argv=0x7fb268) at /INSTALL/php/php-src/sapi/cli/php_cli.c:943 other info: #uname -a Linux db 2.6.7-mm1 #2 SMP Mon Jun 21 11:36:21 CEST 2004 x86_64 5 GNU/Linux #cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 246 stepping: 8 cpu MHz : 1992.117 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips: 3915.77 TLB size: 1088 4K pages clflush size: 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts ttp processor : 1 vendor_id : AuthenticAMD cpu family : 15 model : 5 model name : AMD Opteron(tm) Processor 246 stepping: 8 cpu MHz : 1992.117 cache size : 1024 KB fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow bogomips: 3981.31 TLB size: 1088 4K pages clflush size: 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts ttp gcc --version gcc (GCC) 3.3.3 20040412 (Gentoo Linux 3.3.3-r6, ssp-3.3.2-2, pie-8.7.6) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc --version gcc (GCC) 3.4.0 20040601 (Gentoo Linux 3.4.0-r6, ssp-3.4-2, pie-8.7.6.3) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. mysql --version mysql Ver 14.5 Distrib 5.0.1-alpha, for unknown-linux (x86_64) (also with 4.1.2) system is gentoo linux ~amd64 #making php ./configure \ \ --enable-debug \ \ --prefix=/usr \ --with-apxs2=/usr/local/apache/bin/apxs \ --with-readline --disable-cgi \ --enable-cli --enable-embed \ --with-ndbm=/usr --with-db4=/usr \ --with-mcrypt=/usr --with-mhash=/usr \ --with-ming=/usr --with-gdbm=/usr \ --with-java=/opt/blackdown-jdk-1.4.2_rc1 \ --without-pgsql --with-xpm-dir=/usr/X11R6 \ --with-pdflib=/usr --with-gd \ --enable-gd-native-ttf --with-png \ --with-png-dir=/usr --with-jpeg \ --with-jpeg-dir=/usr --enable-exif \ --with-tiff --with-tiff-dir=/usr \ --with-freetype-dir=/usr --with-ttf=/usr \ --with-t1lib=/usr --with-gettext \ --with-qtdom=/usr/qt/3 --with-pspell=/usr \ --with-openssl=/usr --without-imap \ --without-ldap --with-dom=/usr