Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
CMakeLists.txt | D | 03-May-2024 | 1,016 | 27 | 20 | |
README.txt | D | 03-May-2024 | 1.4 KiB | 34 | 26 | |
msandr.cc | D | 03-May-2024 | 24.7 KiB | 729 | 483 |
README.txt
1Experimental DynamoRIO-MSAN plugin (codename "MSanDR"). 2Supports Linux/x86_64 only. 3 4Building: 5 1. First, download and build DynamoRIO: 6 (svn co https://dynamorio.googlecode.com/svn/trunk dr && \ 7 cd dr && mkdir build && cd build && \ 8 cmake -DDR_EXT_DRMGR_STATIC=ON -DDR_EXT_DRSYMS_STATIC=ON \ 9 -DDR_EXT_DRUTIL_STATIC=ON -DDR_EXT_DRWRAP_STATIC=ON .. && \ 10 make -j10 && make install) 11 12 2. Download and build DrMemory (for DrSyscall extension) 13 (svn co http://drmemory.googlecode.com/svn/trunk/ drmemory && \ 14 cd drmemory && mkdir build && cd build && \ 15 cmake -DDynamoRIO_DIR=`pwd`/../../dr/exports/cmake .. && \ 16 make -j10 && make install) 17 18 NOTE: The line above will build a shared DrSyscall library in a non-standard 19 location. This will require the use of LD_LIBRARY_PATH when running MSanDR. 20 To build a static DrSyscall library (and link it into MSanDR), add 21 -DDR_EXT_DRSYSCALL_STATIC=ON to the CMake invocation above, but 22 beware: DrSyscall is LGPL. 23 24 3. Now, build LLVM with two extra CMake flags: 25 -DDynamoRIO_DIR=<path_to_dynamorio>/exports/cmake 26 -DDrMemoryFramework_DIR=<path_to_drmemory>/exports64/drmf 27 28 This will build a lib/clang/$VERSION/lib/linux/libclang_rt.msandr-x86_64.so 29 30Running: 31 <path_to_dynamorio>/exports/bin64/drrun -c lib/clang/$VERSION/lib/linux/libclang_rt.msandr-x86_64.so -- test_binary 32 33MSan unit tests contain several tests for MSanDR (use MemorySanitizerDr.* gtest filter). 34