[PATCH] [UBSan] Add returns-nonnull sanitizer.

Alexey Samsonov vonosmas at gmail.com
Mon Aug 11 11:47:11 PDT 2014


Hi rsmith,

This patch adds a runtime check verifying that functions
annotated with "returns_nonnull" attribute do in fact return nonnull pointers.
It is based on suggestion by Jakub Jelinek:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223693.html.
I'm sending a follow-up email to that thread to discuss design issues.

http://reviews.llvm.org/D4849

Files:
  projects/compiler-rt/lib/ubsan/ubsan_handlers.cc
  projects/compiler-rt/lib/ubsan/ubsan_handlers.h
  projects/compiler-rt/test/ubsan/TestCases/Misc/nonnull.cpp
  tools/clang/include/clang/Basic/Sanitizers.def
  tools/clang/lib/CodeGen/CGCall.cpp
  tools/clang/test/CodeGen/catch-undef-behavior.c
  tools/clang/test/Driver/fsanitize.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4849.12361.patch
Type: text/x-patch
Size: 10856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140811/004bb3c1/attachment.bin>


More information about the cfe-commits mailing list