-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dropping the dtor arg args[3] rather than using STR_COPY: Since PHP 8, we no longer support separation in call_user_function(), so we also don't need to worry about things like arguments being replaced with references.
- Loading branch information
Showing
3 changed files
with
24 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
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 #80290: Double free when ASSERT_CALLBACK is used with a dynamic message | ||
--FILE-- | ||
<?php | ||
|
||
assert_options(ASSERT_CALLBACK, function($file, $line, $unused, $message) { | ||
var_dump($message); | ||
}); | ||
|
||
$x = 'x'; | ||
assert(false, 'Dynamic message: ' . $x); | ||
|
||
?> | ||
--EXPECTF-- | ||
string(18) "Dynamic message: x" | ||
|
||
Fatal error: Uncaught AssertionError: Dynamic message: x in %s:%d | ||
Stack trace: | ||
#0 %s(%d): assert(false, 'Dynamic message...') | ||
#1 {main} | ||
thrown in %s on line %d |