libsanitizer: fix SVACE warnings. 04/196004/6 submit/tizen_base/20190221.133303
authorAndrey Drobyshev <a.drobyshev@samsung.com>
Tue, 18 Dec 2018 12:44:59 +0000 (15:44 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 21 Feb 2019 01:11:13 +0000 (01:11 +0000)
commit3c2d2ca79e6295b54803ff2a5a34afc153e841e8
treec3c3bd2dc9c0dec04632f6a0984153df95675184
parent746c34ff87a022d0d372bda1f798b9027f9eb7bd
libsanitizer: fix SVACE warnings.

  * 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.

Change-Id: I9ebcd68362d68be8d738f4b9d5eaad3fae796f6a
Signed-off-by: Andrey Drobyshev <a.drobyshev@samsung.com>
libsanitizer/lsan/lsan_thread.cc
libsanitizer/sanitizer_common/sanitizer_libc.cc
libsanitizer/sanitizer_common/sanitizer_libignore.cc
libsanitizer/sanitizer_common/sanitizer_printf.cc
libsanitizer/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc