rjmccall added a comment. We do not actually support allocation failure for a lot of things around blocks. I don't think the copy-helper functions even have a way to propagate out a failure in copying a field. I have never seen any code in the wild that would handle `Block_copy` returning a null pointer. Effectively it is assumed to not happen.
It seems somewhat unlikely to me that anyone would actually write code like your example without copying the block and potentially triggering the `__block` variable to be moved to the heap, which is why I think pre-moving the variable might be acceptable. With all that said, I agree that crashing and/or just not drilling into the variable is not acceptable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89903/new/ https://reviews.llvm.org/D89903 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits