From:             alex at netflex dot nl
Operating system: Fedora Core 2 (x86_64)
PHP version:      5.0.2
PHP Bug Type:     MySQLi related
Bug description:  Segmentation fault by php_mysqli_fetch_into_hash

Description:
------------
exec a mysql query with mysqli results in Segmentation fault.

Traceback:

#0  zend_object_store_get_object (zobject=0x0) at
/data/downloads/php-5.0.2/Zend/zend_objects_API.c:202
#1  0x000000000046e6dc in php_mysqli_fetch_into_hash (ht=2,
return_value=0x8584f8, this_ptr=0x0, return_value_used=-1073759168,
override_flags=0, into_object=0) at
/data/downloads/php-5.0.2/ext/mysqli/mysqli.c:626
#2  0x00000000004769ef in zif_mysqli_fetch_array (ht=0,
return_value=0x7fbfffbc80, this_ptr=0x2, return_value_used=-1073759168) at
/data/downloads/php-5.0.2/ext/mysqli/mysqli_nonapi.c:185
#3  0x000000000058b10c in zend_do_fcall_common_helper
(execute_data=0x7fbfffcf60, opline=0x84bd00, op_array=0x848c50)at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2711
#4  0x000000000058b24a in zend_do_fcall_handler
(execute_data=0x7fbfffcf60, opline=0x84bd00, op_array=0x848c50) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2843
#5  0x0000000000587da0 in execute (op_array=0x848c50) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:1400
#6  0x000000000058aeff in zend_do_fcall_common_helper
(execute_data=0x7fbfffd210, opline=0x846980, op_array=0x842078) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2740
#7  0x000000000058b1a1 in zend_do_fcall_by_name_handler (execute_data=0x0,
opline=0x7fbfffbc80, op_array=0x2) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:2825
#8  0x0000000000587da0 in execute (op_array=0x842078) at
/data/downloads/php-5.0.2/Zend/zend_execute.c:1400
#9  0x000000000056af79 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /data/downloads/php-5.0.2/Zend/zend.c:1060
#10 0x00000000005371df in php_execute_script (primary_file=0x7fbffff830)
at /data/downloads/php-5.0.2/main/main.c:1629
#11 0x0000000000593bd7 in main (argc=3, argv=0x7fbffff998) at
/data/downloads/php-5.0.2/sapi/cli/php_cli.c:943


PHP (5.0.2): ./configure \
--libdir=/usr/local/lib64 \
--with-apxs2=/services/httpd/bin/apxs \
--with-mysql=/services/mysql \
--with-mysqli=/services/mysql/bin/mysql_config \
--enable-track-vars \
--with-openssl=/usr/local/ssl \
--enable-ftp --enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-gettext \
--with-mm=/usr/local/mm-1.3.0 \
--with-zlib \
--enable-so=shared \
--enable-pcntl \
--with-jpeg-dir=/usr/lib64 \
--with-png-dir=/usr/local \
--enable-gd \
--enable-debug--enable-maintainer-mode

httpd (2.0.52): ./configure \
--prefix=/services/httpd \
--enable-module=rewrite \
--enable-module=info \
--enable-module=status \
--enable-module=log_agent \
--enable-module=log_referer \
--enable-module=so \
--enable-ssl=shared \
CPPFLAGS=-I/usr/kerberos/include \
LDFLAGS=-L/usr/kerberos/lib \
--enable-maintainer-mode

mysql (4.1.1): ./configure \
--prefix=/services/mysql \
--enable-assembler \
--with-innodb \
--without-debug

Reproduce code:
---------------
$result = mysqli_query($conn, 'SELECT * FROM `dns_domains` WHERE `id` = '
. (int)$domainId) or die('MySQL: ' . mysqli_error($conn));

Expected result:
----------------
no crash?

Actual result:
--------------
blank web page in the browser

httpd error log:
[Tue Nov 02 21:04:56 2004] [notice] child pid 1659 exit signal
Segmentation fault (11)

-- 
Edit bug report at http://bugs.php.net/?id=30679&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30679&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30679&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30679&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30679&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30679&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30679&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30679&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30679&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30679&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30679&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30679&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30679&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30679&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30679&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30679&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30679&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30679&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30679&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30679&r=mysqlcfg

Reply via email to