forked from OSchip/llvm-project
parent
43dd07ec3e
commit
c7bcaf8512
|
@ -55,7 +55,7 @@ for F in $SRCS; do
|
||||||
cat $F >> gotsan.cc
|
cat $F >> gotsan.cc
|
||||||
done
|
done
|
||||||
|
|
||||||
FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -fPIC -g -Wall -Werror -fno-exceptions -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4"
|
FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -fPIC -Wall -Werror -fno-exceptions -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4"
|
||||||
if [ "$DEBUG" == "" ]; then
|
if [ "$DEBUG" == "" ]; then
|
||||||
FLAGS+=" -DTSAN_DEBUG=0 -O3 -fomit-frame-pointer"
|
FLAGS+=" -DTSAN_DEBUG=0 -O3 -fomit-frame-pointer"
|
||||||
else
|
else
|
||||||
|
|
|
@ -124,7 +124,6 @@ void InitializeShadowMemory() {
|
||||||
DPrintf("stack %zx\n", (uptr)&shadow);
|
DPrintf("stack %zx\n", (uptr)&shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uptr g_tls_size;
|
|
||||||
static uptr g_data_start;
|
static uptr g_data_start;
|
||||||
static uptr g_data_end;
|
static uptr g_data_end;
|
||||||
|
|
||||||
|
@ -167,6 +166,8 @@ static void InitDataSeg() {
|
||||||
CHECK_LT((uptr)&g_data_start, g_data_end);
|
CHECK_LT((uptr)&g_data_start, g_data_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uptr g_tls_size;
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
# define INTERNAL_FUNCTION __attribute__((regparm(3), stdcall))
|
# define INTERNAL_FUNCTION __attribute__((regparm(3), stdcall))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -186,10 +186,12 @@ void Initialize(ThreadState *thr) {
|
||||||
InitializeMemoryProfile();
|
InitializeMemoryProfile();
|
||||||
InitializeMemoryFlush();
|
InitializeMemoryFlush();
|
||||||
|
|
||||||
|
#ifndef TSAN_GO
|
||||||
const char *external_symbolizer = flags()->external_symbolizer_path;
|
const char *external_symbolizer = flags()->external_symbolizer_path;
|
||||||
if (external_symbolizer != 0 && external_symbolizer[0] != '\0') {
|
if (external_symbolizer != 0 && external_symbolizer[0] != '\0') {
|
||||||
InitializeExternalSymbolizer(external_symbolizer);
|
InitializeExternalSymbolizer(external_symbolizer);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ctx->flags.verbosity)
|
if (ctx->flags.verbosity)
|
||||||
TsanPrintf("***** Running under ThreadSanitizer v2 (pid %d) *****\n",
|
TsanPrintf("***** Running under ThreadSanitizer v2 (pid %d) *****\n",
|
||||||
|
|
Loading…
Reference in New Issue