set(MSAN_LOADABLE_SOURCE msan_loadable.cc)
set(MSAN_UNITTEST_HEADERS
msan_test_config.h
- msandr_test_so.h
../../../include/sanitizer/msan_interface.h
)
-set(MSANDR_UNITTEST_SOURCE msandr_test_so.cc)
set(MSAN_UNITTEST_COMMON_CFLAGS
-I${COMPILER_RT_LIBCXX_PATH}/include
${COMPILER_RT_GTEST_CFLAGS}
msan_compile(MSAN_INST_LOADABLE_OBJECTS ${MSAN_LOADABLE_SOURCE} ${arch} "${kind}"
${MSAN_UNITTEST_INSTRUMENTED_CFLAGS} ${ARGN})
- # Uninstrumented shared object for MSanDR tests.
- set(MSANDR_TEST_OBJECTS)
- msan_compile(MSANDR_TEST_OBJECTS ${MSANDR_UNITTEST_SOURCE} ${arch} "${kind}"
- ${MSAN_UNITTEST_COMMON_CFLAGS})
-
# Instrumented loadable library tests.
set(MSAN_LOADABLE_SO)
msan_link_shared(MSAN_LOADABLE_SO "libmsan_loadable" ${arch} "${kind}"
OBJECTS ${MSAN_INST_LOADABLE_OBJECTS}
DEPS ${MSAN_INST_LOADABLE_OBJECTS})
- # Uninstrumented shared library tests.
- set(MSANDR_TEST_SO)
- msan_link_shared(MSANDR_TEST_SO "libmsandr_test" ${arch} "${kind}"
- OBJECTS ${MSANDR_TEST_OBJECTS}
- DEPS ${MSANDR_TEST_OBJECTS})
-
- set(MSAN_TEST_OBJECTS ${MSAN_INST_TEST_OBJECTS} ${MSAN_INST_GTEST}
- ${MSANDR_TEST_SO})
+ set(MSAN_TEST_OBJECTS ${MSAN_INST_TEST_OBJECTS} ${MSAN_INST_GTEST})
set(MSAN_TEST_DEPS ${MSAN_TEST_OBJECTS} libcxx_msan${kind}
${MSAN_LOADABLE_SO})
if(NOT COMPILER_RT_STANDALONE_BUILD)
#include "sanitizer/allocator_interface.h"
#include "sanitizer/msan_interface.h"
-#include "msandr_test_so.h"
#include <inttypes.h>
#include <stdlib.h>
+++ /dev/null
-//===-- msandr_test_so.cc ------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file is a part of MemorySanitizer.
-//
-// MemorySanitizer unit tests.
-//===----------------------------------------------------------------------===//
-
-#include "msandr_test_so.h"
-
-void dso_memfill(char* s, unsigned n) {
- for (unsigned i = 0; i < n; ++i)
- s[i] = i;
-}
-
-int dso_callfn(int (*fn)(void)) {
- volatile int x = fn();
- return x;
-}
-
-int dso_callfn1(int (*fn)(long long, long long, long long)) { //NOLINT
- volatile int x = fn(1, 2, 3);
- return x;
-}
-
-int dso_stack_store(void (*fn)(int*, int*), int x) {
- int y = x + 1;
- fn(&x, &y);
- return y;
-}
-
-void break_optimization(void *x) {}
+++ /dev/null
-//===-- msandr_test_so.h ----------------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file is a part of MemorySanitizer.
-//
-// MemorySanitizer unit tests.
-//===----------------------------------------------------------------------===//
-
-#ifndef MSANDR_MSANDR_TEST_SO_H
-#define MSANDR_MSANDR_TEST_SO_H
-
-void dso_memfill(char* s, unsigned n);
-int dso_callfn(int (*fn)(void));
-int dso_callfn1(int (*fn)(long long, long long, long long)); //NOLINT
-int dso_stack_store(void (*fn)(int*, int*), int x);
-void break_optimization(void *x);
-
-#endif