C Compilers Break for Objects Larger Than PTRDIFF_MAX Bytes

Pascal Cuoq (via Jean-Francois Roy): The malloc call in the program below succeeds (the program would return 0 if the malloc invocation failed), despite Clang having the same half-the-address-space limitation for 64-bit as for 32-bit. […] Unfortunately, an optimizing compiler’s code appears to be littered with optimizations that assume object sizes are less than PTRDIFF_MAX. … Continue reading C Compilers Break for Objects Larger Than PTRDIFF_MAX Bytes