ID: 32282
User updated by: gabriel at telana dot com
Reported By: gabriel at telana dot com
-Status: Feedback
+Status: Open
Bug Type: MySQLi related
Operating System: Linux 2.6 (custom, based on FC1)
PHP Version: 5.0.3
New Comment:
No luck, still segfaults :( Here's the backtrace:
#0 0x00000000005ee5a1 in zend_object_store_get_object (zobject=0x0)
at /home/korsoft/php5-200503142130/Zend/zend_objects_API.c:200
#1 0x000000000045837f in php_mysqli_fetch_into_hash (ht=2,
return_value=0x91d350, this_ptr=0x0, return_value_used=1,
override_flags=0, into_object=0)
at /home/korsoft/php5-200503142130/ext/mysqli/mysqli.c:778
#2 0x0000000000464c18 in zif_mysqli_fetch_array (ht=2,
return_value=0x91d350,
this_ptr=0x0, return_value_used=1)
at /home/korsoft/php5-200503142130/ext/mysqli/mysqli_nonapi.c:147
#3 0x00000000005fcff2 in zend_do_fcall_common_helper_SPEC (
execute_data=0x7fffffffd0b0) at zend_vm_execute.h:175
#4 0x00000000006000f9 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (
execute_data=0x7fffffffd0b0) at zend_vm_execute.h:1535
#5 0x00000000005fcc56 in execute (op_array=0x933cf0) at
zend_vm_execute.h:78
#6 0x00000000005d18fe in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/korsoft/php5-200503142130/Zend/zend.c:1058
#7 0x0000000000584dbe in php_execute_script
(primary_file=0x7ffffffff790)
at /home/korsoft/php5-200503142130/main/main.c:1637
#8 0x0000000000655395 in main (argc=4, argv=0x7ffffffff918)
at /home/korsoft/php5-200503142130/sapi/cli/php_cli.c:944
My apologies, I should have tried a cvs snapshot before submitting the
bug report.
Previous Comments:
------------------------------------------------------------------------
[2005-03-14 22:32:19] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-03-13 12:58:04] gabriel at telana dot com
Okay, here's the backtrace:
#0 0x00000000005da789 in zend_object_store_get_object (zobject=0x0)
at /home/korsoft/php-5.0.3/Zend/zend_objects_API.c:200
#1 0x000000000045484b in php_mysqli_fetch_into_hash (ht=2,
return_value=0x8750a0, this_ptr=0x0, return_value_used=1,
override_flags=0, into_object=0)
at /home/korsoft/php-5.0.3/ext/mysqli/mysqli.c:624
#2 0x0000000000460e53 in zif_mysqli_fetch_array (ht=2,
return_value=0x8750a0,
this_ptr=0x0, return_value_used=1)
at /home/korsoft/php-5.0.3/ext/mysqli/mysqli_nonapi.c:189
#3 0x00000000005ec703 in zend_do_fcall_common_helper (
execute_data=0x7fffffffd0f0, opline=0x890920, op_array=0x88b7b0)
at /home/korsoft/php-5.0.3/Zend/zend_execute.c:2711
#4 0x00000000005ece55 in zend_do_fcall_handler
(execute_data=0x7fffffffd0f0,
opline=0x890920, op_array=0x88b7b0)
at /home/korsoft/php-5.0.3/Zend/zend_execute.c:2843
#5 0x00000000005e8be3 in execute (op_array=0x88b7b0)
at /home/korsoft/php-5.0.3/Zend/zend_execute.c:1400
#6 0x00000000005beff7 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /home/korsoft/php-5.0.3/Zend/zend.c:1069
#7 0x00000000005740e8 in php_execute_script
(primary_file=0x7ffffffff7c0)
at /home/korsoft/php-5.0.3/main/main.c:1628
#8 0x00000000005f6471 in main (argc=4, argv=0x7ffffffff948)
at /home/korsoft/php-5.0.3/sapi/cli/php_cli.c:943
One additional note, once I compiled with --enable-debug, passing
MYSQLI_USE_RESULT to mysqli_query() caused it to print "Query was
empty" instead of segfaulting (no matter what the query was).
Just for the record, here's my reproduce script:
<?php
$link = mysqli_connect("db.telana.com", "root", "*******");
$result = mysqli_query($link, "SHOW DATABASES") or
die(mysqli_error($link));
while(list($database) = mysqli_fetch_array($result, MYSQLI_ASSOC))
echo "$database\n";
mysqli_free_result($result);
mysqli_close($link);
?>
------------------------------------------------------------------------
[2005-03-11 23:34:24] gabriel at telana dot com
Description:
------------
This is exactly the same as bug #28933, except it's still happening for
me on PHP 5.0.3 on x86_64. I would have added a comment to that bug but
it's been closed.
The only other info I've seen on the net related to this is something
about mixing 32-bit and 64-bit libraries. I'm running a pure 64-bit
system so that's not the problem.
I tested this with the simplest possible configuration: "./configure
--with-mysqli=/usr/bin/mysql_config" and ran the test script
(functionally identical with the one in #28933) with the CLI version,
using php.ini-dist.
Tested with mysql versions 4.1.7 and 4.1.10.
Reproduce code:
---------------
See bug #28933
Expected result:
----------------
PHP to not segfault :)
Actual result:
--------------
PHP segfaults :(
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32282&edit=1