http://llvm.org/bugs/show_bug.cgi?id=22009

            Bug ID: 22009
           Summary: Migrate the rest of tsan tests to cmake/lit
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Part of tsan tests were migrated to cmake/lit (output tests), but the rest is
left in 'make presubmit'. This is effectively equivalent to removal of part of
useful tests as people started to ignore 'make presubmit'.

First, Go runtime become broken:

(cd go && ./buildgo.sh)
gcc gotsan.cc -c -o race_linux_amd64.syso -I../rtl -I../..
-I../../sanitizer_common -I../../../include -std=c++11 -m64 -Wall
-fno-exceptions -fno-rtti -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4
-DSANITIZER_DEADLOCK_DETECTOR_VERSION=2 -fPIC -ffreestanding
-Wno-maybe-uninitialized -Wno-unused-const-variable -Werror
-Wno-unknown-warning-option -DTSAN_DEBUG=0 -O3 -msse3 -fomit-frame-pointer
race_linux_amd64.syso: In function `__sanitizer::internal_start_thread(void
(*)(void*), void*)':
gotsan.cc:(.text+0x104d6): undefined reference to
`__sanitizer::real_pthread_create(void*, void*, void* (*)(void*), void*)'
race_linux_amd64.syso: In function `__sanitizer::internal_join_thread(void*)':
gotsan.cc:(.text+0x10503): undefined reference to
`__sanitizer::real_pthread_join(void*, void**)'
collect2: error: ld returned 1 exit status

Now the rest become broken:

(ulimit -s 8192; ./tsan_test)
==18778==FATAL: ThreadSanitizer: failed to intercept memcpy
make[1]: *** [run] Error 1

Please finish the migration to cmake/lit: restore what 'make presubmit' does:

presubmit:
    ../sanitizer_common/scripts/check_lint.sh
    # Debug build with clang.
    $(MAKE) -f Makefile.old clean
    $(MAKE) -f Makefile.old run DEBUG=1 -j 16 CC=$(CLANG) CXX=$(CLANG)++
    # Release build with clang.
    $(MAKE) -f Makefile.old clean
    $(MAKE) -f Makefile.old run DEBUG=0 -j 16 CC=$(CLANG) CXX=$(CLANG)++
    ./check_memcpy.sh
    # Debug build with gcc
    $(MAKE) -f Makefile.old clean
    $(MAKE) -f Makefile.old run DEBUG=1 -j 16 CC=gcc CXX=g++
    # Release build with gcc
    $(MAKE) -f Makefile.old clean
    $(MAKE) -f Makefile.old run DEBUG=0 -j 16 CC=gcc CXX=g++
    ./check_memcpy.sh
    ./check_analyze.sh
    # Sanity check for Go runtime
    (cd go && ./buildgo.sh)

and run tests with -O0/-O2 as asan does.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to