Edit report at https://bugs.php.net/bug.php?id=63398&edit=1
ID: 63398 Updated by: larue...@php.net Reported by: aeryaguzov at gmail dot com Summary: Segfault when polling closed link Status: Closed Type: Bug Package: MySQLi related Operating System: Ubuntu 12.04 PHP Version: 5.4.8 -Assigned To: mysql +Assigned To: laruence Block user comment: N Private report: N New Comment: The fix for this bug has been committed. 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. Previous Comments: ------------------------------------------------------------------------ [2012-11-30 06:31:01] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=40fabf68edd5524b9ce0cda925d6c7888d8441c3 Log: Fixed bug #63398 (Segfault when polling closed link) ------------------------------------------------------------------------ [2012-11-30 06:30:28] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=40fabf68edd5524b9ce0cda925d6c7888d8441c3 Log: Fixed bug #63398 (Segfault when polling closed link) ------------------------------------------------------------------------ [2012-11-30 06:29:42] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=40fabf68edd5524b9ce0cda925d6c7888d8441c3 Log: Fixed bug #63398 (Segfault when polling closed link) ------------------------------------------------------------------------ [2012-11-30 06:28:16] larue...@php.net Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=40fabf68edd5524b9ce0cda925d6c7888d8441c3 Log: Fixed bug #63398 (Segfault when polling closed link) ------------------------------------------------------------------------ [2012-10-30 15:01:30] larue...@php.net a quick fix is: diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 2b6a1af..c51fadd 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -695,6 +695,9 @@ static int mysqlnd_zval_array_from_mysqlnd_array(MYSQLND **in_array, zval *out_a { MY_MYSQL *mysql; mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*elem TSRMLS_CC); + if (!intern->ptr) { + continue; + } mysql = (MY_MYSQL *) ((MYSQLI_RESOURCE *)intern->ptr)- >ptr; if (mysql->mysql == *p) { zend_hash_next_index_insert(new_hash, (void *)elem, sizeof(zval *), (void **)&dest_elem); ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=63398 -- Edit this bug report at https://bugs.php.net/bug.php?id=63398&edit=1