Apparently both bugs had been reported previously, pre-AI, if so some important questions need to be asked about how those reports slipped through without a fix.
https://bugs.php.net/bug.php?id=78876 marks the OOM bug as closed and fixed in 2020.
It seems the AI exploration was able to find variants of those bugs that were not fixed rather than exactly those bugs themselves?
The fix at the time wasn't to do proper cleanup on eralloc() failure, it was merely to avoid filename length being cast to a negative number.