-
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.
Handle operand replacement in JMP_NULL
In this case it's not sufficient to replace the JMP_NULL operand, as it keeps the temporary alive and there may be more uses later. Fix this by generalizing existing handling for other similar opcodes like CASE/SWITCH and LIST_R. Fixes oss-fuzz 5820123475214336.
- Loading branch information
Showing
2 changed files
with
49 additions
and
62 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,16 @@ | ||
--TEST-- | ||
Constant propagation with nullsafe operator | ||
--FILE-- | ||
<?php | ||
|
||
class Bar { const FOO = "foo"; } | ||
|
||
try { | ||
Bar::FOO?->length(); | ||
} catch (Error $e) { | ||
echo $e->getMessage(), "\n"; | ||
} | ||
|
||
?> | ||
--EXPECT-- | ||
Call to a member function length() on string |