[PATCH] D58108: [sanitizer]: fix warnings reported by SVACE static analyzer.

Andrey Drobyshev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 12 01:09:43 PST 2019

drmtmych created this revision.
drmtmych added reviewers: kcc, yuri, dvyukov.
drmtmych added a project: Sanitizers.
Herald added subscribers: Sanitizers, llvm-commits, jdoerfert, dkrupp, donat.nagy, Szelethus, jfb, a.sidorin, baloghadamsoftware, kubamracek.
Herald added a project: LLVM.

The warnings are:

- lsan_thread.cc: return value of a function '__lsan::CurrentThreadContext' is dereferenced without checking.
- sanitizer_libc.cc: casting a signed value which has type 'char' to a bigger unsigned integer type 'unsigned int' while initializing a variable.
- sanitizer_libignore.cc: constructor may not initialize class members of '__sanitizer::LibIgnore'.
- sanitizer_printf.cc: 'minimal_num_length' with type 'u8', is promoted to type 'int' 32b in 'minimal_num_length - pos', then sign-extended to type 'unsigned long' 64b.
- sanitizer_symbolizer_posix_libcdep.cc: after having been compared to NULL value, pointer (...)->path is passed as 1st parameter in call to function '__sanitizer::LLVMSymbolizer::LLVMSymbolizer', where it is dereferenced.

  rCRT Compiler Runtime



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58108.186412.patch
Type: text/x-patch
Size: 5360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190212/775c902c/attachment.bin>

More information about the llvm-commits mailing list