<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - [tsan] Multiple TSAN assertions in tests with COMPILER_RT_DEBUG=ON"
   href="https://bugs.llvm.org/show_bug.cgi?id=46860">46860</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[tsan] Multiple TSAN assertions in tests with COMPILER_RT_DEBUG=ON
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>tsan
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>arichardson.kde@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I am seeing the following test failures on Linux x86_64 (Ubuntu 18.04) with
commit 1956cf1042d3c406d9e9cefe47d3b43adf2bdbe1 from earlier today.

  SanitizerCommon-tsan-x86_64-Linux :: Linux/allow_user_segv.cpp
  SanitizerCommon-tsan-x86_64-Linux :: Linux/signal_line.cpp
  SanitizerCommon-tsan-x86_64-Linux :: Posix/dedup_token_length_test.cpp
  SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_read_test.cpp
  SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_write_test.cpp
  SanitizerCommon-tsan-x86_64-Linux :: Posix/sanitizer_set_report_fd_test.cpp

The backtraces are all similar:


  SanitizerCommon-tsan-x86_64-Linux :: Linux/allow_user_segv.cpp
User sigaction installed
FATAL: ThreadSanitizer CHECK failed:
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798
"((IsAppMem(x))) != (0)" (0x0, 0x0)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25
(allow_user_segv.cpp.tmp+0x515b25)
    #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5
(allow_user_segv.cpp.tmp+0x437fd3)
    #2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3
(allow_user_segv.cpp.tmp+0x4a475d)
    #3 __tsan::MemToShadow(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10
(allow_user_segv.cpp.tmp+0x4f433e)
    #4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool, bool)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830
(allow_user_segv.cpp.tmp+0x4f433e)
    #5 __tsan::MemoryRead(__tsan::ThreadState*, unsigned long, unsigned long,
int)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:742
(allow_user_segv.cpp.tmp+0x4f433e)
    #6 __tsan_read4
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:29
(allow_user_segv.cpp.tmp+0x4f433e)
    #7 DoSEGV()
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cpp:51:10
(allow_user_segv.cpp.tmp+0x5253cb)
    #8 main
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/allow_user_segv.cpp:72:10
(allow_user_segv.cpp.tmp+0x525581)
    #9 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
    #10 _start <null> (allow_user_segv.cpp.tmp+0x41d479)



  SanitizerCommon-tsan-x86_64-Linux :: Linux/signal_line.cpp
FATAL: ThreadSanitizer CHECK failed:
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798
"((IsAppMem(x))) != (0)" (0x0, 0x0)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25
(signal_line.cpp.tmp+0x515a05)
    #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5
(signal_line.cpp.tmp+0x437eb3)
    #2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3
(signal_line.cpp.tmp+0x4a463d)
    #3 __tsan::MemToShadow(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10
(signal_line.cpp.tmp+0x4fadde)
    #4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool, bool)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830
(signal_line.cpp.tmp+0x4fadde)
    #5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long,
int)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747
(signal_line.cpp.tmp+0x4fadde)
    #6 __tsan_write4
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45
(signal_line.cpp.tmp+0x4fadde)
    #7 main
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Linux/signal_line.cpp:16:28
(signal_line.cpp.tmp+0x52515c)
    #8 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
    #9 _start <null> (signal_line.cpp.tmp+0x41d359)


  SanitizerCommon-tsan-x86_64-Linux :: Posix/dedup_token_length_test.cpp
env 'TSAN_OPTIONS=abort_on_error=0, dedup_token_length=1'
/local/scratch/alr48/cheri/build/upstream-llvm-project-build/projects/compiler-rt/test/sanitizer_common/tsan-x86_64-Linux/Posix/Output/dedup_token_length_test.cpp.tmp
FATAL: ThreadSanitizer CHECK failed:
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798
"((IsAppMem(x))) != (0)" (0x0, 0x0)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25
(dedup_token_length_test.cpp.tmp+0x515a85)
    #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5
(dedup_token_length_test.cpp.tmp+0x437f33)
    #2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3
(dedup_token_length_test.cpp.tmp+0x4a46bd)
    #3 __tsan::MemToShadow(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10
(dedup_token_length_test.cpp.tmp+0x4fae5e)
    #4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool, bool)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830
(dedup_token_length_test.cpp.tmp+0x4fae5e)
    #5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long,
int)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747
(dedup_token_length_test.cpp.tmp+0x4fae5e)
    #6 __tsan_write4
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45
(dedup_token_length_test.cpp.tmp+0x4fae5e)
    #7 void Xyz::Abc<int, int>()
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:17:11
(dedup_token_length_test.cpp.tmp+0x525279)
    #8 bar
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:22:3
(dedup_token_length_test.cpp.tmp+0x525181)
    #9 FOO()
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:26:3
(dedup_token_length_test.cpp.tmp+0x5251a5)
    #10 main
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cpp:30:3
(dedup_token_length_test.cpp.tmp+0x5251fd)
    #11 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
    #12 _start <null> (dedup_token_length_test.cpp.tmp+0x41d3d9)


  SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_read_test.cpp
FATAL: ThreadSanitizer CHECK failed:
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798
"((IsAppMem(x))) != (0)" (0x0, 0x0)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25
(illegal_read_test.cpp.tmp+0x5159b5)
    #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5
(illegal_read_test.cpp.tmp+0x437e63)
    #2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3
(illegal_read_test.cpp.tmp+0x4a45ed)
    #3 __tsan::MemToShadow(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10
(illegal_read_test.cpp.tmp+0x4f41ce)
    #4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool, bool)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830
(illegal_read_test.cpp.tmp+0x4f41ce)
    #5 __tsan::MemoryRead(__tsan::ThreadState*, unsigned long, unsigned long,
int)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:742
(illegal_read_test.cpp.tmp+0x4f41ce)
    #6 __tsan_read4
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:29
(illegal_read_test.cpp.tmp+0x4f41ce)
    #7 main
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_read_test.cpp:11:7
(illegal_read_test.cpp.tmp+0x5250f8)
    #8 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
    #9 _start <null> (illegal_read_test.cpp.tmp+0x41d309)

  SanitizerCommon-tsan-x86_64-Linux :: Posix/illegal_write_test.cpp
FATAL: ThreadSanitizer CHECK failed:
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798
"((IsAppMem(x))) != (0)" (0x0, 0x0)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25
(illegal_write_test.cpp.tmp+0x5159b5)
    #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5
(illegal_write_test.cpp.tmp+0x437e63)
    #2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3
(illegal_write_test.cpp.tmp+0x4a45ed)
    #3 __tsan::MemToShadow(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10
(illegal_write_test.cpp.tmp+0x4fad8e)
    #4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool, bool)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830
(illegal_write_test.cpp.tmp+0x4fad8e)
    #5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long,
int)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747
(illegal_write_test.cpp.tmp+0x4fad8e)
    #6 __tsan_write4
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45
(illegal_write_test.cpp.tmp+0x4fad8e)
    #7 main
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/illegal_write_test.cpp:10:9
(illegal_write_test.cpp.tmp+0x5250f8)
    #8 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
    #9 _start <null> (illegal_write_test.cpp.tmp+0x41d309)


  SanitizerCommon-tsan-x86_64-Linux :: Posix/sanitizer_set_report_fd_test.cpp
FATAL: ThreadSanitizer CHECK failed:
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798
"((IsAppMem(x))) != (0)" (0x0, 0x0)
    #0 __tsan::TsanCheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cpp:47:25
(sanitizer_set_report_fd_test.cpp.tmp+0x515ad5)
    #1 __sanitizer::CheckFailed(char const*, int, char const*, unsigned long
long, unsigned long long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_termination.cpp:78:5
(sanitizer_set_report_fd_test.cpp.tmp+0x437f83)
    #2 unsigned long __tsan::MemToShadowImpl<__tsan::Mapping>(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:798:3
(sanitizer_set_report_fd_test.cpp.tmp+0x4a470d)
    #3 __tsan::MemToShadow(unsigned long)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_platform.h:832:10
(sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
    #4 __tsan::MemoryAccess(__tsan::ThreadState*, unsigned long, unsigned long,
int, bool, bool)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp:830
(sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
    #5 __tsan::MemoryWrite(__tsan::ThreadState*, unsigned long, unsigned long,
int)
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_rtl.h:747
(sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
    #6 __tsan_write4
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/lib/tsan/rtl/tsan_interface_inl.h:45
(sanitizer_set_report_fd_test.cpp.tmp+0x4faeae)
    #7 main
/local/scratch/alr48/cheri/upstream-llvm-project/compiler-rt/test/sanitizer_common/TestCases/Posix/sanitizer_set_report_fd_test.cpp:31:9
(sanitizer_set_report_fd_test.cpp.tmp+0x525238)
    #8 __libc_start_main
/build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310 (libc.so.6+0x21b96)
    #9 _start <null> (sanitizer_set_report_fd_test.cpp.tmp+0x41d429)</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>