[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] =?utf-8?q?svn:_/php/php-src/_branches/PHP=5F5=5F3/NEWS_branches/PHP=5F5=5F3/ext/intl/colla
From: Gustavo_André_dos_Santos_Lopes <cataphract () php ! net>
Date: 2010-12-27 1:10:08
Message-ID: svn-cataphract-1293412208-306722-471151642 () svn ! php ! net
[Download RAW message or body]
cataphract Mon, 27 Dec 2010 01:10:08 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306722
Log:
- Fixed bug #53612 (Segmentation fault when using several cloned intl
objects).
Bug: http://bugs.php.net/53612 (Verified) Segmentation fault when cloning intl NumberFormatter object
Changed paths:
U php/php-src/branches/PHP_5_3/NEWS
U php/php-src/branches/PHP_5_3/ext/intl/collator/collator_class.c
U php/php-src/branches/PHP_5_3/ext/intl/dateformat/dateformat_class.c
U php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_class.c
U php/php-src/branches/PHP_5_3/ext/intl/msgformat/msgformat_class.c
U php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c
U php/php-src/trunk/ext/intl/collator/collator_class.c
U php/php-src/trunk/ext/intl/dateformat/dateformat_class.c
U php/php-src/trunk/ext/intl/formatter/formatter_class.c
U php/php-src/trunk/ext/intl/msgformat/msgformat_class.c
U php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c
["svn-diffs-306722.txt" (text/x-diff)]
Modified: php/php-src/branches/PHP_5_3/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3/NEWS 2010-12-27 00:57:57 UTC (rev 306721)
+++ php/php-src/branches/PHP_5_3/NEWS 2010-12-27 01:10:08 UTC (rev 306722)
@@ -36,6 +36,8 @@
- Intl extension:
. Fixed bug #53512 (NumberFormatter::setSymbol crash on bogus $attr values).
(Felipe)
+ . Fixed bug #53612 (Segmentation fault when using cloned several intl
+ objects). (Gustavo)
- MySQL Improved extension:
. Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA
Modified: php/php-src/branches/PHP_5_3/ext/intl/collator/collator_class.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/intl/collator/collator_class.c 2010-12-27 \
00:57:57 UTC (rev 306721)
+++ php/php-src/branches/PHP_5_3/ext/intl/collator/collator_class.c 2010-12-27 \
01:10:08 UTC (rev 306722) @@ -29,6 +29,7 @@
#include <unicode/ucol.h>
zend_class_entry *Collator_ce_ptr = NULL;
+static zend_object_handlers Collator_handlers;
/*
* Auxiliary functions needed by objects of 'Collator' class
@@ -73,7 +74,7 @@
(zend_objects_free_object_storage_t)Collator_objects_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &Collator_handlers;
return retval;
}
@@ -142,6 +143,10 @@
ce.create_object = Collator_object_create;
Collator_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&Collator_handlers, zend_get_std_object_handlers(),
+ sizeof Collator_handlers);
+ Collator_handlers.clone_obj = NULL;
+
/* Declare 'Collator' class properties. */
if( !Collator_ce_ptr )
{
Modified: php/php-src/branches/PHP_5_3/ext/intl/dateformat/dateformat_class.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/intl/dateformat/dateformat_class.c 2010-12-27 \
00:57:57 UTC (rev 306721)
+++ php/php-src/branches/PHP_5_3/ext/intl/dateformat/dateformat_class.c 2010-12-27 \
01:10:08 UTC (rev 306722) @@ -24,6 +24,7 @@
#include "dateformat_attr.h"
zend_class_entry *IntlDateFormatter_ce_ptr = NULL;
+static zend_object_handlers IntlDateFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'IntlDateFormatter' class
@@ -73,7 +74,7 @@
(zend_objects_free_object_storage_t)IntlDateFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &IntlDateFormatter_handlers;
return retval;
}
@@ -161,6 +162,10 @@
ce.create_object = IntlDateFormatter_object_create;
IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&IntlDateFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof IntlDateFormatter_handlers);
+ IntlDateFormatter_handlers.clone_obj = NULL;
+
/* Declare 'IntlDateFormatter' class properties. */
if( !IntlDateFormatter_ce_ptr )
{
Modified: php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_class.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_class.c 2010-12-27 \
00:57:57 UTC (rev 306721)
+++ php/php-src/branches/PHP_5_3/ext/intl/formatter/formatter_class.c 2010-12-27 \
01:10:08 UTC (rev 306722) @@ -25,6 +25,7 @@
#include "formatter_attr.h"
zend_class_entry *NumberFormatter_ce_ptr = NULL;
+static zend_object_handlers NumberFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'NumberFormatter' class
@@ -69,7 +70,7 @@
(zend_objects_free_object_storage_t)NumberFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &NumberFormatter_handlers;
return retval;
}
@@ -171,6 +172,10 @@
ce.create_object = NumberFormatter_object_create;
NumberFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&NumberFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof NumberFormatter_handlers);
+ NumberFormatter_handlers.clone_obj = NULL;
+
/* Declare 'NumberFormatter' class properties. */
if( !NumberFormatter_ce_ptr )
{
Modified: php/php-src/branches/PHP_5_3/ext/intl/msgformat/msgformat_class.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/intl/msgformat/msgformat_class.c 2010-12-27 \
00:57:57 UTC (rev 306721)
+++ php/php-src/branches/PHP_5_3/ext/intl/msgformat/msgformat_class.c 2010-12-27 \
01:10:08 UTC (rev 306722) @@ -25,6 +25,7 @@
#include "msgformat_attr.h"
zend_class_entry *MessageFormatter_ce_ptr = NULL;
+static zend_object_handlers MessageFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'MessageFormatter' class
@@ -66,7 +67,7 @@
(zend_objects_free_object_storage_t)MessageFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &MessageFormatter_handlers;
return retval;
}
@@ -135,6 +136,10 @@
ce.create_object = MessageFormatter_object_create;
MessageFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&MessageFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof MessageFormatter_handlers);
+ MessageFormatter_handlers.clone_obj = NULL;
+
/* Declare 'MessageFormatter' class properties. */
if( !MessageFormatter_ce_ptr )
{
Modified: php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c 2010-12-27 \
00:57:57 UTC (rev 306721)
+++ php/php-src/branches/PHP_5_3/ext/intl/resourcebundle/resourcebundle_class.c 2010-12-27 \
01:10:08 UTC (rev 306722) @@ -420,6 +420,7 @@
}
ResourceBundle_object_handlers = std_object_handlers;
+ ResourceBundle_object_handlers.clone_obj = NULL;
ResourceBundle_object_handlers.read_dimension = resourcebundle_array_get;
ResourceBundle_object_handlers.count_elements = resourcebundle_array_count;
}
Modified: php/php-src/trunk/ext/intl/collator/collator_class.c
===================================================================
--- php/php-src/trunk/ext/intl/collator/collator_class.c 2010-12-27 00:57:57 UTC (rev \
306721)
+++ php/php-src/trunk/ext/intl/collator/collator_class.c 2010-12-27 01:10:08 UTC (rev \
306722) @@ -29,6 +29,7 @@
#include <unicode/ucol.h>
zend_class_entry *Collator_ce_ptr = NULL;
+static zend_object_handlers Collator_handlers;
/*
* Auxiliary functions needed by objects of 'Collator' class
@@ -73,7 +74,7 @@
(zend_objects_free_object_storage_t)Collator_objects_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &Collator_handlers;
return retval;
}
@@ -142,6 +143,10 @@
ce.create_object = Collator_object_create;
Collator_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&Collator_handlers, zend_get_std_object_handlers(),
+ sizeof Collator_handlers);
+ Collator_handlers.clone_obj = NULL;
+
/* Declare 'Collator' class properties. */
if( !Collator_ce_ptr )
{
Modified: php/php-src/trunk/ext/intl/dateformat/dateformat_class.c
===================================================================
--- php/php-src/trunk/ext/intl/dateformat/dateformat_class.c 2010-12-27 00:57:57 UTC \
(rev 306721)
+++ php/php-src/trunk/ext/intl/dateformat/dateformat_class.c 2010-12-27 01:10:08 UTC \
(rev 306722) @@ -24,6 +24,7 @@
#include "dateformat_attr.h"
zend_class_entry *IntlDateFormatter_ce_ptr = NULL;
+static zend_object_handlers IntlDateFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'IntlDateFormatter' class
@@ -73,7 +74,7 @@
(zend_objects_free_object_storage_t)IntlDateFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &IntlDateFormatter_handlers;
return retval;
}
@@ -161,6 +162,10 @@
ce.create_object = IntlDateFormatter_object_create;
IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&IntlDateFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof IntlDateFormatter_handlers);
+ IntlDateFormatter_handlers.clone_obj = NULL;
+
/* Declare 'IntlDateFormatter' class properties. */
if( !IntlDateFormatter_ce_ptr )
{
Modified: php/php-src/trunk/ext/intl/formatter/formatter_class.c
===================================================================
--- php/php-src/trunk/ext/intl/formatter/formatter_class.c 2010-12-27 00:57:57 UTC \
(rev 306721)
+++ php/php-src/trunk/ext/intl/formatter/formatter_class.c 2010-12-27 01:10:08 UTC \
(rev 306722) @@ -25,6 +25,7 @@
#include "formatter_attr.h"
zend_class_entry *NumberFormatter_ce_ptr = NULL;
+static zend_object_handlers NumberFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'NumberFormatter' class
@@ -69,7 +70,7 @@
(zend_objects_free_object_storage_t)NumberFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &NumberFormatter_handlers;
return retval;
}
@@ -171,6 +172,10 @@
ce.create_object = NumberFormatter_object_create;
NumberFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&NumberFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof NumberFormatter_handlers);
+ NumberFormatter_handlers.clone_obj = NULL;
+
/* Declare 'NumberFormatter' class properties. */
if( !NumberFormatter_ce_ptr )
{
Modified: php/php-src/trunk/ext/intl/msgformat/msgformat_class.c
===================================================================
--- php/php-src/trunk/ext/intl/msgformat/msgformat_class.c 2010-12-27 00:57:57 UTC \
(rev 306721)
+++ php/php-src/trunk/ext/intl/msgformat/msgformat_class.c 2010-12-27 01:10:08 UTC \
(rev 306722) @@ -25,6 +25,7 @@
#include "msgformat_attr.h"
zend_class_entry *MessageFormatter_ce_ptr = NULL;
+static zend_object_handlers MessageFormatter_handlers;
/*
* Auxiliary functions needed by objects of 'MessageFormatter' class
@@ -66,7 +67,7 @@
(zend_objects_free_object_storage_t)MessageFormatter_object_free,
NULL TSRMLS_CC );
- retval.handlers = zend_get_std_object_handlers();
+ retval.handlers = &MessageFormatter_handlers;
return retval;
}
@@ -135,6 +136,10 @@
ce.create_object = MessageFormatter_object_create;
MessageFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ memcpy(&MessageFormatter_handlers, zend_get_std_object_handlers(),
+ sizeof MessageFormatter_handlers);
+ MessageFormatter_handlers.clone_obj = NULL;
+
/* Declare 'MessageFormatter' class properties. */
if( !MessageFormatter_ce_ptr )
{
Modified: php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c
===================================================================
--- php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c 2010-12-27 \
00:57:57 UTC (rev 306721)
+++ php/php-src/trunk/ext/intl/resourcebundle/resourcebundle_class.c 2010-12-27 \
01:10:08 UTC (rev 306722) @@ -420,6 +420,7 @@
}
ResourceBundle_object_handlers = std_object_handlers;
+ ResourceBundle_object_handlers.clone_obj = NULL;
ResourceBundle_object_handlers.read_dimension = resourcebundle_array_get;
ResourceBundle_object_handlers.count_elements = resourcebundle_array_count;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic