[cfe-users] Code locations from the Memory Sanitizer

2017-04-28 Thread Erik de Castro Lopo via cfe-users
Hi all,

I've tried Clang versions 3.6, 3.9 and 5.0 (all installed from Debian
packages on a Debian x86_64 machine), but I still can't get Memory
Sanitizer to give me the error file and line number locations.

The project is

   http://github.com/erikd/libsndfile

and I'm configuring/building it with eg:

CC=clang-5.0
CXX=clang++-5.0
CFLAGS="-fsanitize=memory -fno-omit-frame-pointer -g 
-Wno-expansion-to-defined"
CXXFLAGS=$CFLAGS
./configure --enable-werror --disable-shared
make clean all check

and I get:

broadcast_test : broadcast.rf64 .. 
Uninitialized bytes in __interceptor_write at offset 36 inside 
[0x7100, 104)
==15113==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x67802e  (/home/erik/Git/libsndfile/tests/command_test+0x67802e)
#1 0x600404  (/home/erik/Git/libsndfile/tests/command_test+0x600404)
#2 0x5f72f6  (/home/erik/Git/libsndfile/tests/command_test+0x5f72f6)
#3 0x4be48b  (/home/erik/Git/libsndfile/tests/command_test+0x4be48b)
#4 0x4c06d6  (/home/erik/Git/libsndfile/tests/command_test+0x4c06d6)
#5 0x4b1cfc  (/home/erik/Git/libsndfile/tests/command_test+0x4b1cfc)
#6 0x4a10c6  (/home/erik/Git/libsndfile/tests/command_test+0x4a10c6)
#7 0x495dbf  (/home/erik/Git/libsndfile/tests/command_test+0x495dbf)
#8 0x7f3f37cf22b0  (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
#9 0x41ef79  (/home/erik/Git/libsndfile/tests/command_test+0x41ef79)

I expected to get file and line number position as shown in the documentation.

Clues?

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] Code locations from the Memory Sanitizer

2017-04-28 Thread Rainer Gerhards via cfe-users
2017-04-28 12:25 GMT+02:00 Erik de Castro Lopo via cfe-users
:
> Hi all,
>
> I've tried Clang versions 3.6, 3.9 and 5.0 (all installed from Debian
> packages on a Debian x86_64 machine), but I still can't get Memory
> Sanitizer to give me the error file and line number locations.
>
> The project is
>
>http://github.com/erikd/libsndfile
>
> and I'm configuring/building it with eg:
>
> CC=clang-5.0
> CXX=clang++-5.0
> CFLAGS="-fsanitize=memory -fno-omit-frame-pointer -g 
> -Wno-expansion-to-defined"
> CXXFLAGS=$CFLAGS
> ./configure --enable-werror --disable-shared
> make clean all check
>
> and I get:
>
> broadcast_test : broadcast.rf64 ..
> Uninitialized bytes in __interceptor_write at offset 36 inside 
> [0x7100, 104)
> ==15113==WARNING: MemorySanitizer: use-of-uninitialized-value
> #0 0x67802e  (/home/erik/Git/libsndfile/tests/command_test+0x67802e)
> #1 0x600404  (/home/erik/Git/libsndfile/tests/command_test+0x600404)
> #2 0x5f72f6  (/home/erik/Git/libsndfile/tests/command_test+0x5f72f6)
> #3 0x4be48b  (/home/erik/Git/libsndfile/tests/command_test+0x4be48b)
> #4 0x4c06d6  (/home/erik/Git/libsndfile/tests/command_test+0x4c06d6)
> #5 0x4b1cfc  (/home/erik/Git/libsndfile/tests/command_test+0x4b1cfc)
> #6 0x4a10c6  (/home/erik/Git/libsndfile/tests/command_test+0x4a10c6)
> #7 0x495dbf  (/home/erik/Git/libsndfile/tests/command_test+0x495dbf)
> #8 0x7f3f37cf22b0  (/lib/x86_64-linux-gnu/libc.so.6+0x202b0)
> #9 0x41ef79  (/home/erik/Git/libsndfile/tests/command_test+0x41ef79)
>
> I expected to get file and line number position as shown in the documentation.
>
> Clues?

I often need to set the ASAN_SYMBOLIZER_PATH:

https://clang.llvm.org/docs/AddressSanitizer.html#id4

It often tends to be wrong by package default...

HTH
Rainer

>
> Erik
> --
> --
> Erik de Castro Lopo
> http://www.mega-nerd.com/
> ___
> 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] Code locations from the Memory Sanitizer

2017-04-28 Thread Erik de Castro Lopo via cfe-users
Rainer Gerhards wrote:

> I often need to set the ASAN_SYMBOLIZER_PATH:
> 
> https://clang.llvm.org/docs/AddressSanitizer.html#id4
> 
> It often tends to be wrong by package default...

Bingo! In my case, since I'm using Memory Sanitizer I needed to 
set MSAN_SYMBOLIZER_PATH rather than ASAN_SYMBOLIZER_PATH.

Thanks for your help Rainer!

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] Building RPM for clang

2017-04-28 Thread masaru tsuchiyama via cfe-users
Hi

Could you tell me how to build a RPM of clang?

Regards.
Masaru
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] Building Windows Installer fo clang

2017-04-28 Thread masaru tsuchiyama via cfe-users
Hi

Could you tell me how to build Windows Installer for clang

Regards.
Masaru.
___
cfe-users mailing list
cfe-users@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users