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 (profile)
Status: Closed Package: I18N and L10N related
PHP Version: 5.3.4 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: simast at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC