This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFC] Sanitizers difference in between GCC and LLVM
- From: Martin Liška <mliska at suse dot cz>
- To: Jakub Jelinek <jakub at redhat dot com>, Marek Polacek <polacek at redhat dot com>, Maxim Ostapenko <m dot ostapenko at samsung dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 Oct 2017 11:00:30 +0200
- Subject: [RFC] Sanitizers difference in between GCC and LLVM
- Authentication-results: sourceware.org; auth=none
- References: <20171016185250.GX14653@tucnak>
Hi.
I would like to use this thread to slightly describe differences in GCC and LLVM.
I compared options support by both and:
UBSAN:
1)
gcc: error: unrecognized argument to -fsanitize= option: ‘nullability-arg’
gcc: error: unrecognized argument to -fsanitize= option: ‘nullability-assign’
gcc: error: unrecognized argument to -fsanitize= option: ‘nullability-return’
I guess it's covered by -fsanitize=nonnull-attribute and -fsanitize=returns-nonnull-attribute.
One can't have in GCC a local variable with non-null attribute (nullability-assign), right?
2) unsigned-integer-overflow
As documented, not being a real UBSAN. Do we want that or seen as not useful?
3) function
Indirect function pointer comparison using RTTI in C++. Would it be useful? Ideas?
ASAN:
For ASAN, there's quite up-to-date page: https://github.com/google/sanitizers/wiki/AddressSanitizerClangVsGCC-(5.0-vs-7.1)
The page is quite up-to-date. Currently we should cover all what LLVM supports. Am I right? Or is there any interesting
feature we miss?
Thanks for ideas,
Martin