On Wed, 6 Nov 2024, Richard Biener wrote:
> Since we had malloc/free pair removal for quite some time I think > it should stay on by default. I missed that; now I see what you meant by "not making the existing situation worse". I still miss what happened to "correctness trumps performance" :) Between this and floating-point defaults I have a feeling we keep doing the opposite of what the informed users are asking for. I would like to remind of the calloc issue exacerbated by this patch: when the product of calloc arguments would wrap around, it must return NULL. I didn't see a discussion of a more gentle approach where instead of replacing the result of malloc with a non-zero constant, we would change tmp = malloc(sz); to tmp = (void *)(sz <= SIZE_MAX / 2); and let the following optimizations fold that further based on sz's range. Is there some issue with that that I'm not seeing? Thank you. Alexander