php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62885 mysqli_poll - Segmentation fault
Submitted: 2012-08-21 23:58 UTC Modified: 2012-09-15 11:04 UTC
From: mateusz dot goik at aliantsoft dot pl Assigned: laruence (profile)
Status: Closed Package: MySQLi related
PHP Version: 5.4Git-2012-08-21 (snap) OS: Backtrack 5r2
Private report: No CVE-ID: None
 [2012-08-21 23:58 UTC] mateusz dot goik at aliantsoft dot pl
Description:
------------
mysqli_poll - Segmentation fault

PHP 5.4.7-dev (cli) (built: Aug 22 2012 00:48:06) 

Program received signal SIGSEGV, Segmentation fault.
0x00000000009051a1 in mysqlnd_stream_array_check_for_readiness (conn_array=0x0) at /home/test/php-trunk-201208212130/ext/mysqlnd/mysqlnd.c:1113
1113		while (*p) {

Test script:
---------------
<?php
error_reporting(E_ALL);
$tablica = array();
$test1 = mysqli_poll($test2, $test3, $tablica, null);
?>

Actual result:
--------------
#0  0x00000000009051a1 in mysqlnd_stream_array_check_for_readiness (conn_array=0x0) at /home/test/php-trunk-201208212130/ext/mysqlnd/mysqlnd.c:1113
#1  0x0000000000905533 in _mysqlnd_poll (r_array=0x0, e_array=0x0, dont_poll=0x7fff82480080, sec=0, usec=0, desc_num=0x7fff8248006c) at /home/test/php-trunk-201208212130/ext/mysqlnd/mysqlnd.c:1223
#2  0x00000000006e6012 in zif_mysqli_poll (ht=4, return_value=0x7fb217b8b370, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /home/test/php-trunk-201208212130/ext/mysqli/mysqli_nonapi.c:791
#3  0x00000000009fe45c in zend_do_fcall_common_helper_SPEC (execute_data=0x7fb217b57060) at /home/test/php-trunk-201208212130/Zend/zend_vm_execute.h:642
#4  0x0000000000a05075 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x7fb217b57060) at /home/test/php-trunk-201208212130/Zend/zend_vm_execute.h:2219
#5  0x00000000009fcefd in execute (op_array=0x7fb217b8ac50) at /home/test/php-trunk-201208212130/Zend/zend_vm_execute.h:410
#6  0x00000000009c38e3 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/test/php-trunk-201208212130/Zend/zend.c:1286
#7  0x00000000009413a4 in php_execute_script (primary_file=0x7fff82483940) at /home/test/php-trunk-201208212130/main/main.c:2473
#8  0x0000000000af847d in do_cli (argc=2, argv=0x7fff82483cf8) at /home/test/php-trunk-201208212130/sapi/cli/php_cli.c:988
#9  0x0000000000af92a3 in main (argc=2, argv=0x7fff82483cf8) at /home/test/php-trunk-201208212130/sapi/cli/php_cli.c:1364


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-22 05:39 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e5bdd2c0eeab50dc1f863dae9a32d3857ece6a79
Log: Fixed bug #62885 (mysqli_poll - Segmentation fault)
 [2012-08-22 05:40 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2012-08-22 05:40 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

hmm, simple fix.. committed
 [2012-08-22 05:48 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e5bdd2c0eeab50dc1f863dae9a32d3857ece6a79
Log: Fixed bug #62885 (mysqli_poll - Segmentation fault)
 [2012-08-22 05:49 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e5bdd2c0eeab50dc1f863dae9a32d3857ece6a79
Log: Fixed bug #62885 (mysqli_poll - Segmentation fault)
 [2012-09-15 09:20 UTC] mateusz dot goik at aliantsoft dot pl
PHP 5.4.7 (cli) (built: Sep 14 2012 21:58:46)

<?php
$tablica = array();
$test1 = mysqli_poll($test2, $tablica, $tablica, null);
?>

Program received signal SIGSEGV, Segmentation fault.
0x084b1d2e in mysqlnd_stream_array_check_for_readiness (conn_array=0x0) at /home/test/Pobrane/php-5.4.7/ext/mysqlnd/mysqlnd.c:1113
1113		while (*p) {
 [2012-09-15 11:04 UTC] laruence@php.net
seems this fix is not merged into 5.4.7 release,
https://github.com/php/php-src/blob/php-5.4.7/NEWS
 [2014-10-07 23:23 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e5bdd2c0eeab50dc1f863dae9a32d3857ece6a79
Log: Fixed bug #62885 (mysqli_poll - Segmentation fault)
 [2014-10-07 23:33 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e5bdd2c0eeab50dc1f863dae9a32d3857ece6a79
Log: Fixed bug #62885 (mysqli_poll - Segmentation fault)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC