-
Notifications
You must be signed in to change notification settings - Fork 7.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion `(key)->h != 0 && "Hash must be known"' failed. #10570
Comments
Can confirm on >=8.1. Simpler reproducer (without variable-variables): <?php
$a = new stdClass();
for (; ; ) {
$a->{90};
$a->{0} = 0;
} |
This is what happens: Line 2113 in 18b611d
Note that the hash is not computed here. Then in the second iteration there is a cache slot, but still the hash of name is not computed yet. The lookup in the While changing Line 2088 in 18b611d
While we could add a |
…iled. Fixes phpGH-10570, see phpGH-10570 for analysis.
Co-authored-by: Changochen <changochen1@gmail.com>
…iled. Fixes phpGH-10570, see phpGH-10570 for analysis. Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: Changochen <changochen1@gmail.com>
* PHP-8.1: Fix GH-10570: Assertion `(key)->h != 0 && "Hash must be known"' failed.
* PHP-8.2: Fix GH-10570: Assertion `(key)->h != 0 && "Hash must be known"' failed.
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.3.0-dev
Operating System
No response
The text was updated successfully, but these errors were encountered: