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.
* PHP-7.1: Update NEWS Fixed bug #73392 (A use-after-free in zend allocator management)
- Loading branch information
Showing
2 changed files
with
31 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Bug #73392 (A use-after-free in zend allocator management) | ||
--FILE-- | ||
<?php | ||
class Rep { | ||
public function __invoke() { | ||
return "d"; | ||
} | ||
} | ||
class Foo { | ||
public static function rep($rep) { | ||
return "ok"; | ||
} | ||
} | ||
function b() { | ||
return "b"; | ||
} | ||
var_dump(preg_replace_callback_array( | ||
array( | ||
"/a/" => 'b', "/b/" => function () { return "c"; }, "/c/" => new Rep, "reporting" => array("Foo", "rep"), "a1" => array("Foo", "rep"), | ||
), 'a')); | ||
?> | ||
|
||
--EXPECTF-- | ||
Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d | ||
|
||
Warning: preg_replace_callback_array(): Delimiter must not be alphanumeric or backslash in %sbug73392.php on line %d | ||
NULL |