php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60192 SegFault when Collator not constructed properly
Submitted: 2011-11-01 15:28 UTC Modified: 2011-11-02 07:37 UTC
From: rodney dot rehm at medialize dot de Assigned: fa (profile)
Status: Closed Package: intl (PECL)
PHP Version: 5.3.8 OS: Mac OS X 10.7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rodney dot rehm at medialize dot de
New email:
PHP Version: OS:

 

 [2011-11-01 15:28 UTC] rodney dot rehm at medialize dot de
Description:
------------
If Collator is extended, but parent::__construct() not invoked, any call to sort() will end in a segmentation fault.

Test script:
---------------
<?php

class Collator2 extends Collator {
    public function __construct() {
        // ommitting parent::__construct($someLocale);
    }
}

$c = new Collator2();
$a = array('a', 'b');
$c->sort($a);

Expected result:
----------------
Some kind of Exception, E_ERROR or something. Anything but a SegFault.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-02 06:38 UTC] fa@php.net
-Assigned To: +Assigned To: fa
 [2011-11-02 07:36 UTC] fa@php.net
Automatic comment from SVN on behalf of fa
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=318672
Log: Fix #60192 SegFault when Collator not constructed properly
 [2011-11-02 07:37 UTC] fa@php.net
-Status: Assigned +Status: Closed
 [2011-11-02 07:37 UTC] fa@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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2011-11-03 16:20 UTC] fa@php.net
Automatic comment from SVN on behalf of fa
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=318744
Log: Redid the fix for #60192 with suggestions by Pierre and Kalle
 [2012-04-18 09:48 UTC] laruence@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c2874a8077662e002a970e58f0225d009addeae4
Log: Fix #60192 SegFault when Collator not constructed properly
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c2874a8077662e002a970e58f0225d009addeae4
Log: Fix #60192 SegFault when Collator not constructed properly
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of fa
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c2874a8077662e002a970e58f0225d009addeae4
Log: Fix #60192 SegFault when Collator not constructed properly
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 03:01:30 2024 UTC