[cfe-users] MSAN blacklist

2018-01-29 Thread Bernd Schubert via cfe-users
Hello,

I would like to blacklist some warnings, but everything I tried
so far is ignored.

# cat msan-blacklist.txt
fun:*interceptor_strlen*
fun:*foreach_dirinpath*
fun:foreach_dirinpath
fun:*interceptor_strrchr*
fun:*try_dlopen*
src:*/ltdl.c
src:ltdl.c

So I tried to blacklist all kind of combinations of the failing
functions and also of the related file - without success. It always
fails with the same issue.



Uninitialized bytes in __interceptor_strlen at offset 0 inside
[0x70335370, 45)
==3968020==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x7f0f587fa099 in foreach_dirinpath
/home/bschubert/src/cci/gerrit/src/libltdl/ltdl.c:699:18
[...]

  Uninitialized value was created by a heap allocation
#0 0x453ebd in __interceptor_malloc (/tmp/ime-server-bernd.0+0x453ebd)
#1 0x7f0f568c0f7e in __argz_create_sep (/usr/lib64/libc.so.6+0x90f7e)
#2 0x7f0f585f7775 in _dl_fixup (/lib64/ld-linux-x86-64.so.2+0xe775)

SUMMARY: MemorySanitizer: use-of-uninitialized-value
/home/bschubert/src/cci/gerrit/src/libltdl/ltdl.c:699:18 in
foreach_dirinpath
Exiting


libcci and the main project I'm working on is compiled liked this

libtool: compile:  /opt/llvm-5.0.1/bin/clang -DHAVE_CONFIG_H -I.
-DLTDLOPEN=libltdlc "-DLT_CONFIG_H=" -DLTDL -I. -I. -Ilibltdl
-I./libltdl -I./libltdl -ggdb3 -O2 -fsanitize=memory
-fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor
-fsanitize-blacklist=msan-blacklist.txt -MT libltdlc_la-lt_dlloader.lo
-MD -MP -MF .deps/libltdlc_la-lt_dlloader.Tpo -c lt_dlloader.c  -fPIC
-DPIC -o .libs/libltdlc_la-lt_dlloader.o


Any ideas?


Thanks,
Bernd
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Regarding issue with compilation of multiple source files

2018-01-29 Thread David Blaikie via cfe-users
can you show the actual command & it's exact output? I'm guessing you've
got a -c (or -S, etc) in there somewhere, perhaps?

On Wed, Jan 24, 2018 at 12:08 AM Sameer Joshi via cfe-users <
cfe-users@lists.llvm.org> wrote:

> Hi,
>
> I am compiling multiple source files and trying to generate one executable
> out of it and getting following error:
>
> "cannot specify -o when generating multiple output files"
>
> The command is like following:
>
> $ clang++ exec_1.bin 1.cpp 2.cpp. 3.cpp
>
> Please let me know how to solve this issue.
>
> Regards,
>
> Sameer Joshi
> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
>
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] MSAN blacklist

2018-01-29 Thread Evgenii Stepanov via cfe-users
This is a report from an interceptor, it is not affected by blacklist,
unfortunately.
You could try MSAN_OPTIONS=intercept_strlen=0, but it is likely that
something else will pop up instead.
Try figuring out what is the actual reason for the report, i.e. what
code is supposed to initialize this memory. Is it some other library
that can be built with MSan?

A better place for such questions is https://github.com/google/sanitizers/issues

On Mon, Jan 29, 2018 at 5:59 AM, Bernd Schubert via cfe-users
 wrote:
> Hello,
>
> I would like to blacklist some warnings, but everything I tried
> so far is ignored.
>
> # cat msan-blacklist.txt
> fun:*interceptor_strlen*
> fun:*foreach_dirinpath*
> fun:foreach_dirinpath
> fun:*interceptor_strrchr*
> fun:*try_dlopen*
> src:*/ltdl.c
> src:ltdl.c
>
> So I tried to blacklist all kind of combinations of the failing
> functions and also of the related file - without success. It always
> fails with the same issue.
>
>
>
> Uninitialized bytes in __interceptor_strlen at offset 0 inside
> [0x70335370, 45)
> ==3968020==WARNING: MemorySanitizer: use-of-uninitialized-value
> #0 0x7f0f587fa099 in foreach_dirinpath
> /home/bschubert/src/cci/gerrit/src/libltdl/ltdl.c:699:18
> [...]
>
>   Uninitialized value was created by a heap allocation
> #0 0x453ebd in __interceptor_malloc (/tmp/ime-server-bernd.0+0x453ebd)
> #1 0x7f0f568c0f7e in __argz_create_sep (/usr/lib64/libc.so.6+0x90f7e)
> #2 0x7f0f585f7775 in _dl_fixup (/lib64/ld-linux-x86-64.so.2+0xe775)
>
> SUMMARY: MemorySanitizer: use-of-uninitialized-value
> /home/bschubert/src/cci/gerrit/src/libltdl/ltdl.c:699:18 in
> foreach_dirinpath
> Exiting
>
>
> libcci and the main project I'm working on is compiled liked this
>
> libtool: compile:  /opt/llvm-5.0.1/bin/clang -DHAVE_CONFIG_H -I.
> -DLTDLOPEN=libltdlc "-DLT_CONFIG_H=" -DLTDL -I. -I. -Ilibltdl
> -I./libltdl -I./libltdl -ggdb3 -O2 -fsanitize=memory
> -fsanitize-memory-track-origins -fsanitize-memory-use-after-dtor
> -fsanitize-blacklist=msan-blacklist.txt -MT libltdlc_la-lt_dlloader.lo
> -MD -MP -MF .deps/libltdlc_la-lt_dlloader.Tpo -c lt_dlloader.c  -fPIC
> -DPIC -o .libs/libltdlc_la-lt_dlloader.o
>
>
> Any ideas?
>
>
> Thanks,
> Bernd
> ___
> cfe-users mailing list
> cfe-users@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users