The discussion at hand was about what the behavior should be around uninitialized memory, and you were claiming
malloc is not special (“little more than an external function that returns a pointer”). I was arguing why that is not the case. It was not clear to me that you were not saying this is what heap allocations are, but rather what heap allocations could be, if we wanted to deviate from the typical C-like model. Sorry for the confusion.
All sources, I do not agree. How would you specify casting whatever you get back from malloc (or an uninitialized stack slot) to a function pointer and calling that, without making it UB?
Many sources, maybe – if you are willing to swap out LLVM with something else. Taming down LLVM far enough may prove hard to impossible. But anyway I doubt this is a realistic option, the performance loss will likely be enormous. So this discussion does not seem useful to me.