[llvm-bugs] [Bug 35135] New: [Unittests] Failures uncovered by randomly shuffling containers before sorting

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 30 13:43:58 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=35135

            Bug ID: 35135
           Summary: [Unittests] Failures uncovered by randomly shuffling
                    containers before sorting
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mgrang at codeaurora.org
                CC: llvm-bugs at lists.llvm.org

I have pushed a patch which randomly shuffles a container before calling
std::sort or array_pod_sort: https://reviews.llvm.org/D39245

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171030/5cca1feb/attachment.html>


More information about the llvm-bugs mailing list