<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 - 7 GWP-ASan lit test failures in linux self build after commit b22910daab95"
   href="https://bugs.llvm.org/show_bug.cgi?id=47480">47480</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>7 GWP-ASan lit test failures in linux self build after commit b22910daab95
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>douglas_yung@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As part of our testing internally, we do a self-host build of the compiler on
linux and run the lit tests to make sure that everything works. Recently this
self-host build started failing 7 GWP-ASan tests in the stage 1 build of our
self-host build. I bisected the test failure to recent commit
b22910daab95be1ebc6ab8a74190e38130b0e6ef.

The 7 tests that are failing are:

1. GWP-ASan-x86_64 :: double_delete.cpp
2. GWP-ASan-x86_64 :: double_deletea.cpp
3. GWP-ASan-x86_64 :: double_free.cpp
4. GWP-ASan-x86_64 :: invalid_free_left.cpp
5. GWP-ASan-x86_64 :: invalid_free_right.cpp
6. GWP-ASan-x86_64 :: realloc.cpp
7. GwpAsan-Unittest :: ./GwpAsan-x86_64-
Test/BacktraceGuardedPoolAllocator.DoubleFree

I was able to reproduce this locally on my linux machine running Ubuntu 20.04
using both Gcc 9.3.0 and clang 10.0.0 to build the initial compiler.

Steps to reproduce the failure:
1. Build clang using the system compiler (gcc 9.3 or clang 10 in my case)
2. Use the clang built in step 1 to rebuild clang
3. Using the version of clang built in step 2, run the lit tests

The cmake command I used to build was the following:
cmake -G Ninja -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_VERSION_SUFFIX=
-DLLVM_BUILD_RUNTIME=ON -DLLVM_TOOL_LLD_BUILD=OFF "-DLLVM_LIT_ARGS=--verbose
-j150" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON
-DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_TARGETS_TO_BUILD=all
"-DLLVM_ENABLE_PROJECTS=clang;compiler-rt" -DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++ <path to llvm sources>

The Unittest that failed produced the following output:
FAIL: GwpAsan-Unittest ::
./GwpAsan-x86_64-Test/BacktraceGuardedPoolAllocator.DoubleFree (32710 of 69710)
******************** TEST 'GwpAsan-Unittest ::
./GwpAsan-x86_64-Test/BacktraceGuardedPoolAllocator.DoubleFree' FAILED
********************
Note: Google Test filter = BacktraceGuardedPoolAllocator.DoubleFree
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from BacktraceGuardedPoolAllocator
[ RUN      ] BacktraceGuardedPoolAllocator.DoubleFree
/home/dyung/src/upstream/llvm_clean_git/compiler-rt/lib/gwp_asan/tests/backtrace.cpp:45:
Failure
Death test: DeallocateMemory2(GPA, Ptr)
    Result: failed to die.
 Error msg:
[  DEATH   ]
[  FAILED  ] BacktraceGuardedPoolAllocator.DoubleFree (62 ms)
[----------] 1 test from BacktraceGuardedPoolAllocator (62 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (69 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] BacktraceGuardedPoolAllocator.DoubleFree

 1 FAILED TEST


While the regular lit tests that failed all seemed to not produce any output:
FileCheck error: '<stdin>' is empty.
FileCheck command line:  FileCheck
/home/dyung/src/upstream/llvm_clean_git/compiler-rt/test/gwp_asan/double_delete.cpp</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>