<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 - Conditional jump or move depends on uninitialised value"
   href="https://bugs.llvm.org/show_bug.cgi?id=45096">45096</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Conditional jump or move depends on uninitialised value
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rafael@espindo.la
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23199" name="attach_23199" title="testcase">attachment 23199</a> <a href="attachment.cgi?id=23199&action=edit" title="testcase">[details]</a></span>
testcase

Running

$ valgrind clang -cc1 -S -std=c++17 -o native-stack.s native-stack.ii

prints

==1872739== Conditional jump or move depends on uninitialised value(s)
==1872739==    at 0xE0CAF5E: clang::OverloadCandidate::getNumParams() const
(Overload.h:897)
==1872739==    by 0xE0B4FEB: (anonymous
namespace)::CompareOverloadCandidatesForDisplay::operator()(clang::OverloadCandidate
const*, clang::OverloadCandidate const*) (SemaOverload.cpp:11183)
==1872739==    by 0xE0C8232: bool __gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay>::operator()<clang::OverloadCandidate**,
clang::OverloadCandidate**>(clang::OverloadCandidate**,
clang::OverloadCandidate**) (predefined_ops.h:143)
==1872739==    by 0xE0C8171: void
std::__insertion_sort<clang::OverloadCandidate**,
__gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay> >(clang::OverloadCandidate**,
clang::OverloadCandidate**, __gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay>) (stl_algo.h:1846)
==1872739==    by 0xE0C9412: void
std::__chunk_insertion_sort<clang::OverloadCandidate**, long,
__gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay> >(clang::OverloadCandidate**,
clang::OverloadCandidate**, long, __gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay>) (stl_algo.h:2692)
==1872739==    by 0xE0C850F: void
std::__merge_sort_with_buffer<clang::OverloadCandidate**,
clang::OverloadCandidate**, __gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay> >(clang::OverloadCandidate**,
clang::OverloadCandidate**, clang::OverloadCandidate**,
__gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay>) (stl_algo.h:2710)
==1872739==    by 0xE0C7834: void
std::__stable_sort_adaptive<clang::OverloadCandidate**,
clang::OverloadCandidate**, long, __gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay> >(clang::OverloadCandidate**,
clang::OverloadCandidate**, clang::OverloadCandidate**, long,
__gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay>) (stl_algo.h:2742)
==1872739==    by 0xE0C6BC1: void
std::__stable_sort<clang::OverloadCandidate**,
__gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay> >(clang::OverloadCandidate**,
clang::OverloadCandidate**, __gnu_cxx::__ops::_Iter_comp_iter<(anonymous
namespace)::CompareOverloadCandidatesForDisplay>) (stl_algo.h:5033)
==1872739==    by 0xE0C629A: void std::stable_sort<clang::OverloadCandidate**,
(anonymous
namespace)::CompareOverloadCandidatesForDisplay>(clang::OverloadCandidate**,
clang::OverloadCandidate**, (anonymous
namespace)::CompareOverloadCandidatesForDisplay) (stl_algo.h:5102)
==1872739==    by 0xE0C5AE4: void
llvm::stable_sort<llvm::SmallVector<clang::OverloadCandidate*, 32u>&,
(anonymous
namespace)::CompareOverloadCandidatesForDisplay>(llvm::SmallVector<clang::OverloadCandidate*,
32u>&, (anonymous namespace)::CompareOverloadCandidatesForDisplay)
(STLExtras.h:1298)
==1872739==    by 0xE0B5B3F:
clang::OverloadCandidateSet::CompleteCandidates(clang::Sema&,
clang::OverloadCandidateDisplayKind, llvm::ArrayRef<clang::Expr*>,
clang::SourceLocation, llvm::function_ref<bool (clang::OverloadCandidate&)>)
(SemaOverload.cpp:11401)
==1872739==    by 0xE0B5BCB:
clang::OverloadCandidateSet::NoteCandidates(std::pair<clang::SourceLocation,
clang::PartialDiagnostic>, clang::Sema&, clang::OverloadCandidateDisplayKind,
llvm::ArrayRef<clang::Expr*>, llvm::StringRef, clang::SourceLocation,
llvm::function_ref<bool (clang::OverloadCandidate&)>) (SemaOverload.cpp:11414)</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>