And before I go to sleep: Yes, this PHP vuln is Yet Another Thing That Would Not Happen If It Were Written In Rust.
And I'm going to go further: Knowing what I know about the Linux kernel, I bet it's full of vulns of this shape (OOM -> early ret -> bad state/uninitialized/etc badness).
People with tokens, have fun.
(And no, an in-kernel OOM/alloc failure is not the same thing as an oom_killer OOM that kills a process)