php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53612 Segmentation fault when cloning intl NumberFormatter object
Submitted: 2010-12-26 05:18 UTC Modified: 2010-12-27 02:10 UTC
From: simast at gmail dot com Assigned: cataphract
Status: Closed Package: I18N and L10N related
PHP Version: 5.3.4 OS: Linux
Private report: No CVE-ID:
 [2010-12-26 05:18 UTC] simast at gmail dot com
Description:
------------
Cloning NumberFormatter instance will result in PHP segfault (see test script). I 
haven't tested other built-in intl classes - they may have the same issue.

Test script:
---------------
$formatter = new NumberFormatter('en_US', NumberFormatter::DECIMAL);

$clonedFormatter = clone $formatter;
$clonedFormatter->format(12.54);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-26 07:13 UTC] kalle@php.net
-Status: Open +Status: Verified
 [2010-12-26 07:13 UTC] kalle@php.net
This should be the same across all of the intl extensions as there is no clone hooks defined so the relevant data is not copied on clone which leads to segmentation faults
 [2010-12-26 07:20 UTC] kalle@php.net
-Package: Unknown/Other Function +Package: I18N and L10N related
 [2010-12-27 02:10 UTC] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=306722
Log: - Fixed bug #53612 (Segmentation fault when using several cloned intl
  objects).
 [2010-12-27 02:10 UTC] cataphract@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cataphract
 [2010-12-27 02:10 UTC] cataphract@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/.
 
Thank you for the report, and for helping us make PHP better.


 [2010-12-27 02:47 UTC] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=306723
Log: - Applied to intl version fix for PHP bug #53612.
#Note: I didn't test this because the extension doesn't compile with PHP5.3.
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 02:02:10 2014 UTC