[Git][ghc/ghc][wip/spj-apporv-Oct24] 28 commits: Handle heap allocation failure in I/O primops