<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Migrate the rest of tsan tests to cmake/lit"
   href="http://llvm.org/bugs/show_bug.cgi?id=22009">22009</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Migrate the rest of tsan tests to cmake/lit
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dvyukov@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>