|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32282 segfault using mysqli_fetch_array
Submitted: 2005-03-11 23:34 UTC Modified: 2005-04-06 08:48 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gabriel at telana dot com Assigned: georg (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.0.4 OS: Linux 2.6 (custom, based on FC1)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gabriel at telana dot com
New email:
PHP Version: OS:


 [2005-03-11 23:34 UTC] gabriel at telana dot com
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 :(


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-14 22:32 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-03-14 22:59 UTC] gabriel at telana dot com
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.
 [2005-04-02 01:14 UTC] gabriel at telana dot com
Still segfaults with 5.0.4.  Is there anything else I can do to help you guys figure this out?  An account on my system or something?
 [2005-04-06 08:48 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 09 02:05:54 2022 UTC