mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
MFH: fix #36055 (possible OCI8 crash in multithreaded environment)
This commit is contained in:
parent
5a6a07467f
commit
4278ffd3b4
2 changed files with 21 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -7,6 +7,7 @@ PHP NEWS
|
||||||
MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
|
MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
|
||||||
- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
|
- Fixed imagecolorallocate() and imagecolorallocatelapha() to return FALSE
|
||||||
on error. (Pierre)
|
on error. (Pierre)
|
||||||
|
- Fixed bug #36055 (possible OCI8 crash in multithreaded environment). (Tony)
|
||||||
- Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values).
|
- Fixed bug #36046 (parse_ini_file() miscounts lines in multi-line values).
|
||||||
(Ilia)
|
(Ilia)
|
||||||
- Fixed bug #36038 (ext/hash compile failure on Mac OSX). (Tony)
|
- Fixed bug #36038 (ext/hash compile failure on Mac OSX). (Tony)
|
||||||
|
|
|
@ -89,6 +89,7 @@ static void php_oci_collection_list_dtor (zend_rsrc_list_entry * TSRMLS_DC);
|
||||||
|
|
||||||
static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC);
|
static int php_oci_persistent_helper(zend_rsrc_list_entry *le TSRMLS_DC);
|
||||||
#ifdef ZTS
|
#ifdef ZTS
|
||||||
|
static int php_oci_statement_helper(zend_rsrc_list_entry *le TSRMLS_DC);
|
||||||
static int php_oci_regular_helper(zend_rsrc_list_entry *le TSRMLS_DC);
|
static int php_oci_regular_helper(zend_rsrc_list_entry *le TSRMLS_DC);
|
||||||
#endif
|
#endif
|
||||||
static int php_oci_connection_ping(php_oci_connection * TSRMLS_DC);
|
static int php_oci_connection_ping(php_oci_connection * TSRMLS_DC);
|
||||||
|
@ -622,6 +623,10 @@ PHP_MSHUTDOWN_FUNCTION(oci)
|
||||||
|
|
||||||
PHP_RSHUTDOWN_FUNCTION(oci)
|
PHP_RSHUTDOWN_FUNCTION(oci)
|
||||||
{
|
{
|
||||||
|
#ifdef ZTS
|
||||||
|
zend_hash_apply(&EG(regular_list), (apply_func_t) php_oci_statement_helper TSRMLS_CC);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* check persistent connections and do the necessary actions if needed */
|
/* check persistent connections and do the necessary actions if needed */
|
||||||
zend_hash_apply(&EG(persistent_list), (apply_func_t) php_oci_persistent_helper TSRMLS_CC);
|
zend_hash_apply(&EG(persistent_list), (apply_func_t) php_oci_persistent_helper TSRMLS_CC);
|
||||||
|
|
||||||
|
@ -1745,6 +1750,21 @@ static int php_oci_regular_helper(zend_rsrc_list_entry *le TSRMLS_DC)
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/* {{{ php_oci_statement_helper()
|
||||||
|
Helper function to destroy statements on thread shutdown in ZTS mode */
|
||||||
|
static int php_oci_statement_helper(zend_rsrc_list_entry *le TSRMLS_DC)
|
||||||
|
{
|
||||||
|
php_oci_statement *statement;
|
||||||
|
|
||||||
|
if (le->type == le_statement) {
|
||||||
|
statement = (php_oci_statement *)le->ptr;
|
||||||
|
if (statement) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
} /* }}} */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* HAVE_OCI8 */
|
#endif /* HAVE_OCI8 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue