mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Bugfix# 28829 bcmath values for 0, 1, and 2 initialized/freed at wrong time for threaded sapis.
This commit is contained in:
parent
2ec89aa8e1
commit
c4bf45e39a
1
NEWS
1
NEWS
@ -1,6 +1,7 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2004, PHP 5.0.1
|
||||
- Fixed bug #28829 (Thread-unsafety in bcmath elementary values). (Sara)
|
||||
|
||||
13 Jul 2004, PHP 5.0.0
|
||||
- Updated PCRE to provide better error handling in certain cases. (Andrei)
|
||||
|
@ -53,8 +53,8 @@ zend_module_entry bcmath_module_entry = {
|
||||
bcmath_functions,
|
||||
PHP_MINIT(bcmath),
|
||||
PHP_MSHUTDOWN(bcmath),
|
||||
NULL,
|
||||
NULL,
|
||||
PHP_RINIT(bcmath),
|
||||
PHP_RSHUTDOWN(bcmath),
|
||||
PHP_MINFO(bcmath),
|
||||
NO_VERSION_YET,
|
||||
STANDARD_MODULE_PROPERTIES
|
||||
@ -86,8 +86,6 @@ PHP_MINIT_FUNCTION(bcmath)
|
||||
|
||||
REGISTER_INI_ENTRIES();
|
||||
|
||||
bc_init_numbers(TSRMLS_C);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@ -95,13 +93,31 @@ PHP_MINIT_FUNCTION(bcmath)
|
||||
/* {{{ PHP_MSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_MSHUTDOWN_FUNCTION(bcmath)
|
||||
{
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RINIT_FUNCTION
|
||||
*/
|
||||
PHP_RINIT_FUNCTION(bcmath)
|
||||
{
|
||||
bc_init_numbers(TSRMLS_C);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_RSHUTDOWN_FUNCTION
|
||||
*/
|
||||
PHP_RSHUTDOWN_FUNCTION(bcmath)
|
||||
{
|
||||
_bc_free_num_ex(&BCG(_zero_), 1);
|
||||
_bc_free_num_ex(&BCG(_one_), 1);
|
||||
_bc_free_num_ex(&BCG(_two_), 1);
|
||||
|
||||
UNREGISTER_INI_ENTRIES();
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -30,6 +30,8 @@ extern zend_module_entry bcmath_module_entry;
|
||||
|
||||
PHP_MINIT_FUNCTION(bcmath);
|
||||
PHP_MSHUTDOWN_FUNCTION(bcmath);
|
||||
PHP_RINIT_FUNCTION(bcmath);
|
||||
PHP_RSHUTDOWN_FUNCTION(bcmath);
|
||||
PHP_MINFO_FUNCTION(bcmath);
|
||||
|
||||
PHP_FUNCTION(bcadd);
|
||||
|
Loading…
Reference in New Issue
Block a user