[Git][ghc/ghc][wip/T23162-spj] 32 commits: Handle heap allocation failure in I/O primops