With malloc(0) returning NULL, it is exactly the same behavior as historically observed for realloc(foo, 0). http://reviews.llvm.org/D9040 EMAIL PREFERENCES http://reviews.llvm.org/settings/panel/emailpreferences/