forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #60192 SegFault when Collator not constructed properly
- Loading branch information
Showing
8 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #60192 (SegFault when Collator not constructed properly) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) { die('skip intl extension not available'); } | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
class Collator2 extends Collator{ | ||
public function __construct() { | ||
// ommitting parent::__construct($someLocale); | ||
} | ||
} | ||
|
||
$c = new Collator2(); | ||
$c->compare('h', 'H'); | ||
--EXPECTF-- | ||
|
||
Fatal error: Collator::compare(): Object not initialized in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #60192 (SegFault when Collator not constructed properly) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) { die('skip intl extension not available'); } | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
class Collator2 extends Collator{ | ||
public function __construct() { | ||
// ommitting parent::__construct($someLocale); | ||
} | ||
} | ||
|
||
$c = new Collator2(); | ||
$c->getLocale(Locale::ACTUAL_LOCALE); | ||
--EXPECTF-- | ||
|
||
Fatal error: Collator::getLocale(): Object not initialized in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
Bug #60192 (SegFault when Collator not constructed properly) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) { die('skip intl extension not available'); } | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
class Collator2 extends Collator{ | ||
public function __construct() { | ||
// ommitting parent::__construct($someLocale); | ||
} | ||
} | ||
|
||
$c = new Collator2(); | ||
$c->getSortKey('h'); | ||
--EXPECTF-- | ||
|
||
Fatal error: Collator::getSortKey(): Object not initialized in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
Bug #60192 (SegFault when Collator not constructed properly) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) { die('skip intl extension not available'); } | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
class Collator2 extends Collator{ | ||
public function __construct() { | ||
// ommitting parent::__construct($someLocale); | ||
} | ||
} | ||
|
||
$c = new Collator2(); | ||
$a = array('a', 'b'); | ||
$c->sort($a); | ||
--EXPECTF-- | ||
|
||
Fatal error: Collator::sort(): Object not initialized in %s on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--TEST-- | ||
Bug #60192 (SegFault when Collator not constructed properly) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) { die('skip intl extension not available'); } | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
class Collator2 extends Collator{ | ||
public function __construct() { | ||
// ommitting parent::__construct($someLocale); | ||
} | ||
} | ||
|
||
$c = new Collator2(); | ||
$a = array('a', 'b'); | ||
$c->sortWithSortKeys($a); | ||
--EXPECTF-- | ||
|
||
Fatal error: Collator::sortWithSortKeys(): Object not initialized in %s on line %d |