[llvm-bugs] [Bug 50797] New: clang goes into an endless loop while trying to produce diagnostics

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 22 01:10:20 PDT 2021


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

            Bug ID: 50797
           Summary: clang goes into an endless loop while trying to
                    produce diagnostics
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jeroen.dobbelaere at synopsys.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

During a creduce session of a csmith triggered issue, I stumbled upon this
unrelated, but still annoying bug:
For the provided program, clang goes into an endless loop.
Based on the backtrace, it might be related to
TransformTypos::RecursiveTransformLoop ; At least, that one is consistently
showing up.


#0  0x0000000004b111e0 in clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformCXXDependentScopeMemberExpr(clang::CXXDependentScopeMemberExpr*)
()
#1  0x0000000004b10898 in clang::TreeTransform<(anonymous
namespace)::TransformTypos>::TransformBinaryOperator(clang::BinaryOperator*) ()
#2  0x0000000004ad9d63 in (anonymous
namespace)::TransformTypos::RecursiveTransformLoop(clang::Expr*, bool&) ()
#3  0x0000000004ada6be in clang::Sema::CorrectDelayedTyposInExpr(clang::Expr*,
clang::VarDecl*, bool, llvm::function_ref<clang::ActionResult<clang::Expr*,
true> (clang::Expr*)>) [clone .localalias.8] ()
#4  0x00000000046bfddd in
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) [clone .lo


https://www.godbolt.org/z/5Mxae6fWY

Based on godbolt's feedback, this was introduced for llvm-12 and is still
present in trunc
It also only happens when in 'C' mode, C++ mode does not get into a loop.

-- 
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/20210622/b9119a67/attachment.html>


More information about the llvm-bugs mailing list