[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions
Johannes Doerfert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 9 22:15:52 PDT 2020
jdoerfert added a comment.
In D85345#2205712 <https://reviews.llvm.org/D85345#2205712>, @aqjune wrote:
> What about undef or poison is given to malloc? If it should raise UB, the size argument and returned pointer should be noundef.
It is unclear to me if we want to forbid undef to be passed to malloc. It makes practical sense but not from a semantic perspective.
However, even if you pass undef you should not get undef back. So the return should never be undef for sure. If it doesn, how could you ever deal with it, given that a branch on the result would be UB :D
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85345/new/
https://reviews.llvm.org/D85345
More information about the cfe-commits
mailing list