[PATCH] D128472: [pseudo] Check follow-sets instead of tying reduce actions to lookahead tokens.

Bjorn Pettersson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 1 09:25:11 PDT 2022


bjope added a comment.

Our downstream bots have failed when using `LLVM_ENABLE_EXPENSIVE_CHECKS=ON` , and I think (unless my bisecting got screwed up) that it started to happen after this patch.

We typically get

  Failed Tests (10):
    ClangPseudo :: lr-build-basic.test
    ClangPseudo :: lr-build-conflicts.test
    clangPseudo Unit Tests :: ./ClangPseudoTests/10/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/11/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/12/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/13/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/14/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/15/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/16/31
    clangPseudo Unit Tests :: ./ClangPseudoTests/9/31

And the failing stack traces look like this:

  /lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../include/c++/9.3.0/bits/stl_vector.h:1060: std::vector::const_reference std::vector<unsigned short, std::allocator<unsigned short> >::operator[](std::vector::size_type) const [_Tp = unsigned short, _Alloc = std::allocator<unsigned short>]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
   #0 0x000000000047b6b3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x47b6b3)
   #1 0x00000000004795cc llvm::sys::RunSignalHandlers() (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x4795cc)
   #2 0x000000000047bcc6 SignalHandler(int) (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x47bcc6)
   #3 0x00007f9ace5af630 __restore_rt (/lib64/libpthread.so.0+0xf630)
   #4 0x00007f9acd6ce387 __GI_raise (/lib64/libc.so.6+0x36387)
   #5 0x00007f9acd6cfa78 __GI_abort (/lib64/libc.so.6+0x37a78)
   #6 0x000000000045b988 (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x45b988)
   #7 0x00000000004e42a6 clang::pseudo::(anonymous namespace)::GLRReduce::popPending() (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x4e42a6)
   #8 0x00000000004e15f2 clang::pseudo::(anonymous namespace)::GLRReduce::operator()(std::vector<clang::pseudo::GSS::Node const*, std::allocator<clang::pseudo::GSS::Node const*> >&, unsigned short) (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x4e15f2)
   #9 0x00000000004e2e15 clang::pseudo::glrReduce(std::vector<clang::pseudo::GSS::Node const*, std::allocator<clang::pseudo::GSS::Node const*> >&, unsigned short, clang::pseudo::ParseParams const&) (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x4e2e15)
  #10 0x0000000000432379 clang::pseudo::(anonymous namespace)::GLRTest_ReduceConflictsSplitting_Test::TestBody() (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x432379)
  #11 0x00000000004b8b6c testing::Test::Run() (/repo/llvm/build-all-expensive/tools/clang/tools/extra/pseudo/unittests/./ClangPseudoTests+0x4b8b6c)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128472/new/

https://reviews.llvm.org/D128472



More information about the cfe-commits mailing list