-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Null dereference because cache_slot is null #11614
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
Comments
Can you provide any info on the configurations? Because AFAIK all CEs should be available from a cache slot for usage for the type checker. Also on what type is it failing? As this might be an issue of not having allocated enough cache slots (considering I implemented intersection and DNF types and that's an issue I hit into by not having enough tests...) |
Hi @Girgias, this is our PHP config: https://paste.daniil.it/config, PHP segfaulted when validating input with https://github.com/zoonru/valinor, here's some more of the PHP stacktrace:
And here's some more type information:
|
@Girgias Got permission to share the full coredump, I've DM-ed to you on mastodon, feel free to share it with any other PHP dev as needed (didn't feel comfortable to share it here :) |
I cannot get the coredump to work, can't you give me reproducible steps so that I can run in on my machine? |
To inspect the coredump, you can add the ondrej repos on ubuntu 20.04, and install:
Then checkout the PHP-8.2.7 tag of php-src and run To reproduce approximately what we're doing in our code:
|
Ah and of course the coredump is compressed with zstd (the extension can be easy to miss given the long filename), it has to be decompressed with |
I am on Fedora, so Ubuntu debug steps are not going to help me here :/ |
This can be done inside of a docker image too, actually I'm debugging this precisely on the official ubuntu:20.04 image |
I don't use Docker, so I suppose time to figure that out. But frankly having a better (and actual) reproducible script that segfaults would be way more useful, as this would also become the regression test. Just looking at the stack trace tho the |
Does this still affect you? Or have you seen something like this? A reproducer or a coredump would be great. |
No feedback was provided. The issue is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so. Thank you. |
Uh oh!
There was an error while loading. Please reload this page.
Description
We've recently enabled coredump reporting in production, and we've been getting loads of coredumps, here's one of them.
This seems to be caused by a null pointer dereference in zend_fetch_ce_from_cache_slot (
if (EXPECTED(HAVE_CACHE_SLOT && *cache_slot)) {
:Gdb backtrace:
zbacktrace:
ref: compressed_coredump-php.97977.1688702525
Feel free to tag me if further inspection of the coredump is needed.
PHP Version
PHP 8.2.7
Operating System
Ubuntu 20.04, ondrej repos
The text was updated successfully, but these errors were encountered: