[cfe-users] Code locations from the Memory Sanitizer

Erik de Castro Lopo via cfe-users cfe-users at lists.llvm.org
Fri Apr 28 03:25:30 PDT 2017


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 [0x710000000000, 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/



More information about the cfe-users mailing list