[PATCH] D34299: [ubsan] Improve diagnostics for return value checks (clang)
Vedant Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 22 14:23:12 PDT 2017
vsk updated this revision to Diff 103632.
vsk marked an inline comment as done.
vsk added a comment.
Handle functions without return statements correctly (fixing an issue pointed out by @arphaman). Now, the instrumentation always checks that we have a valid return location before calling the runtime. I added tests for this on the clang side: we can't test it on the compiler-rt side, because functions without return statements can cause stack corruption / crashes on Darwin.
https://reviews.llvm.org/D34299
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.cpp
lib/CodeGen/CodeGenFunction.h
test/CodeGenObjC/ubsan-nonnull-and-nullability.m
test/CodeGenObjC/ubsan-nullability.m
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34299.103632.patch
Type: text/x-patch
Size: 14010 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170622/ce07a161/attachment-0001.bin>
More information about the cfe-commits
mailing list