OPcache should zero out cache slots?
| From: | Rob Landers | Date: | Mon, 10 Mar 2025 08:22:42 +0000 |
| Subject: | OPcache should zero out cache slots? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-126685@lists.php.net to get a copy of this message | ||
Hello internals,
I’ve been trying to chase down a very subtle bug in 8.4 that only happens when OPcache is enabled
(I'm trying to create a reproducer to file an actual bug). From what I can tell, OPcache
doesn’t zero out cache slots, so occasionally, a cache slot will contain garbage that happens to
pass asserts/checks that causes the program to behave incorrectly. Without OPcache, cache slots are
always NULL if not set.
It's quite rare to end up in that situation, though, but I was wondering if anyone has any
opinions on this?
— Rob