[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-10 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D85345#2205745 , @jdoerfert wrote: > In D85345#2205712 , @aqjune wrote: > >> What about undef or poison is given to malloc? If it should raise UB, the >> size argument and returned pointe

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In 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

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. What about undef or poison is given to malloc? If it should raise UB, the size argument and returned pointer should be noundef. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85345/new/ https://reviews.llvm.org/D85345 _

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D85345#2205691 , @aqjune wrote: > If things go well, I'll add noundef to other library functions such as utime, > setenv, unsetenv, as well. > For malloc/calloc/realloc/free, I'll think more about them. I guess it is >

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. If things go well, I'll add noundef to other library functions such as utime, setenv, unsetenv, as well. For malloc/calloc/realloc/free, I'll think more about them. I guess it is safe to tag noundef to free's operand, but for malloc I'm not 100% sure... Repository:

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGef018cb65c98: [BuildLibCalls] Add noundef to standard I/O functions (authored by aqjune). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D85345: [BuildLibCalls] Add noundef to standard I/O functions

2020-08-09 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 284246. aqjune added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update PR3589-freestanding-libcalls.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85345/new/ https://revie