<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 - [Unittests] Failures uncovered by randomly shuffling containers before sorting"
   href="https://bugs.llvm.org/show_bug.cgi?id=35135">35135</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[Unittests] Failures uncovered by randomly shuffling containers before sorting
          </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>Linux
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mgrang@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have pushed a patch which randomly shuffles a container before calling
std::sort or array_pod_sort: <a href="https://reviews.llvm.org/D39245">https://reviews.llvm.org/D39245</a>

This is intended to uncover non-deterministic sorting order for elements with
the same key. The patch cannot be merged unless the failures it uncovers can be
fixed, otherwise bots will start breaking as soon as it merges.

The following are the current ninja check-all failures with this patch (across
all targets on an asserts build):

    Clang :: Driver/autocomplete.c
    Clang :: Misc/diag-template-diffing.cpp
    Clang :: Misc/error-limit-multiple-notes.cpp
    Clang :: OpenMP/task_firstprivate_codegen.cpp
    Clang :: OpenMP/task_private_codegen.cpp
    Clang :: OpenMP/taskloop_firstprivate_codegen.cpp
    Clang :: OpenMP/taskloop_lastprivate_codegen.cpp
    Clang :: OpenMP/taskloop_private_codegen.cpp
    Clang :: OpenMP/taskloop_simd_firstprivate_codegen.cpp
    Clang :: OpenMP/taskloop_simd_lastprivate
1 warning(s) in tests.
_codegen.cpp
    Clang :: OpenMP/taskloop_simd_private_codegen.cpp
    Clang :: SemaCXX/builtin-ptrtomember-overload-1.cpp
    LLVM :: CodeGen/ARM/switch-minsize.ll
    LLVM :: CodeGen/Hexagon/args.ll
    LLVM :: CodeGen/Hexagon/expand-condsets-basic.ll
    LLVM :: CodeGen/Hexagon/gp-rel.ll
    LLVM :: CodeGen/Hexagon/packetize_cond_inst.ll
    LLVM :: CodeGen/Hexagon/simple_addend.ll
    LLVM :: CodeGen/Hexagon/swp-matmul-bitext.ll
    LLVM :: CodeGen/Hexagon/swp-stages4.ll
    LLVM :: CodeGen/Hexagon/swp-vsum.ll
    LLVM :: CodeGen/X86/switch-bt.ll
    LLVM :: CodeGen/X86/switch-density.ll
    LLVM :: CodeGen/X86/switch.ll
    LLVM :: CodeGen/X86/x86-shrink-wrapping.ll
    LLVM :: DebugInfo/X86/multiple-aranges.ll
    LLVM :: MC/Hexagon/align.s
    LLVM :: MC/Hexagon/asmMap.s
    LLVM :: MC/Hexagon/<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Backend crash when emitting optimized code with debug info"
   href="show_bug.cgi?id=20416">bug20416</a>.s
    LLVM :: MC/Hexagon/double-vector-producer.s
    LLVM :: MC/Hexagon/duplex-registers.s
    LLVM :: MC/Hexagon/instructions/j.s
    LLVM :: Transforms/Util/PredicateInfo/testandor.ll

In order to reproduce a failure you would need to apply the above patch and
then change all calls to std::sort and array_pod_sort with llvm::sort in the
source/header files related to your test case.

Alternately, you can apply these 2 patches which convert std::sort &
array_pod_sort to llvm::sort:

llvm --> <a href="https://reviews.llvm.org/differential/diff/120879">https://reviews.llvm.org/differential/diff/120879</a>
clang --> <a href="https://reviews.llvm.org/differential/diff/120880">https://reviews.llvm.org/differential/diff/120880</a></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>