[llvm-bugs] [Bug 50925] New: vs 2010 ostream:133: makes SA assertion failure

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 28 06:18:09 PDT 2021


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

            Bug ID: 50925
           Summary: vs 2010 ostream:133: makes SA assertion failure
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: info at ustchcs.com
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

VS 2010:ostream:133:  return (_Ok ? _CONVERTIBLE_TO_TRUE : 0);

Assertion failure location:
https://github.com/llvm/llvm-project/blob/main/clang/lib/StaticAnalyzer/Core/RegionStore.cpp#L1438

1.      <eof> parser at end of file
Assertion failed!

Program: Z:\Workspace\dist\bin\clang-tidy.exe
File: /workdir/llvm-project/clang/lib/StaticAnalyzer/Core/RegionStore.cpp, Line
1439

Expression: !T->isVoidType() && "Attempting to dereference a void pointer!"
 #0 0x0000000062a31e80 HandleAbort.cold.232
(Z:\Workspace\dist\bin\LLVMSupport.dll+0x1e1e80)
 #1 0x000007fefdff1b65 (C:\Windows\system32\msvcrt.dll+0x41b65)
 #2 0x000007fefdff55ea (C:\Windows\system32\msvcrt.dll+0x455ea)
 #3 0x000000005c3505f6 _wassert
./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt\./mingw-w64-crt/misc\wassert.c:36:0
 #4 0x000000005c34f766 _assert
./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt\./mingw-w64-crt/misc\assert.c:29:0
 #5 0x000000005c2ff559 (anonymous
namespace)::RegionStoreManager::getBinding((anonymous
namespace)::RegionBindingsRef const&, clang::ento::Loc, clang::QualType)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0xef559)
 #6 0x000000005c2ffc03 (anonymous
namespace)::RegionStoreManager::getBinding(void const*, clang::ento::Loc,
clang::QualType) (Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0xefc03)
 #7 0x000000005c23fcf6
clang::ento::bugreporter::trackExpressionValue(clang::ento::ExplodedNode
const*, clang::Expr const*, clang::ento::PathSensitiveBugReport&,
clang::ento::bugreporter::TrackingKind, bool) (.part.1851)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x2fcf6)
 #8 0x000000005c243900 (anonymous
namespace)::ReturnVisitor::visitNodeInitial(clang::ento::ExplodedNode const*,
clang::ento::BugReporterContext&, clang::ento::PathSensitiveBugReport&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x33900)
 #9 0x000000005c244162 (anonymous
namespace)::ReturnVisitor::VisitNode(clang::ento::ExplodedNode const*,
clang::ento::BugReporterContext&, clang::ento::PathSensitiveBugReport&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x34162)
#10 0x000000005c22e139
generateVisitorsDiagnostics(clang::ento::PathSensitiveBugReport*,
clang::ento::ExplodedNode const*, clang::ento::BugReporterContext&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x1e139)
#11 0x000000005c22f5c5 (anonymous
namespace)::PathDiagnosticBuilder::findValidReport(llvm::ArrayRef<clang::ento::PathSensitiveBugReport*>&,
clang::ento::PathSensitiveBugReporter&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x1f5c5)
#12 0x000000005c232b2d
clang::ento::PathSensitiveBugReporter::generatePathDiagnostics(llvm::ArrayRef<clang::ento::PathDiagnosticConsumer*>,
llvm::ArrayRef<clang::ento::PathSensitiveBugReport*>&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x22b2d)
#13 0x000000005c233639
clang::ento::PathSensitiveBugReporter::generateDiagnosticForConsumerMap(clang::ento::BugReport*,
llvm::ArrayRef<clang::ento::PathDiagnosticConsumer*>,
llvm::ArrayRef<clang::ento::BugReport*>)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x23639)
#14 0x000000005c23041b
clang::ento::BugReporter::FlushReport(clang::ento::BugReportEquivClass&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x2041b)
#15 0x000000005c23108f clang::ento::BugReporter::FlushReports()
(Z:\Workspace\dist\bin\clangStaticAnalyzerCore.dll+0x2108f)
#16 0x000000005cdf3f27 (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*)
(Z:\Workspace\dist\bin\clangStaticAnalyzerFrontend.dll+0x3f27)
#17 0x000000005ce11ced (anonymous
namespace)::AnalysisConsumer::HandleDeclsCallGraph(unsigned int)
(Z:\Workspace\dist\bin\clangStaticAnalyzerFrontend.dll+0x21ced)
#18 0x000000005ce127c2 (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&)
(Z:\Workspace\dist\bin\clangStaticAnalyzerFrontend.dll+0x227c2)
#19 0x000000005e346820
clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&)
(Z:\Workspace\dist\bin\clangFrontend.dll+0xc6820)
#20 0x000000005dd21bd9 clang::ParseAST(clang::Sema&, bool, bool)
(Z:\Workspace\dist\bin\clangParse.dll+0x1bd9)
#21 0x000000005e3183a9 clang::FrontendAction::Execute()
(Z:\Workspace\dist\bin\clangFrontend.dll+0x983a9)
#22 0x000000005e2d5cbb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(Z:\Workspace\dist\bin\clangFrontend.dll+0x55cbb)
#23 0x000000005c0566da
clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>,
clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>,
clang::DiagnosticConsumer*) (Z:\Workspace\dist\bin\clangTooling.dll+0x266da)
#24 0x0000000060f120a5
clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&,
clang::tooling::CompilationDatabase const&,
llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool,
llvm::StringRef)::ActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>,
clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>,
clang::DiagnosticConsumer*) (Z:\Workspace\dist\bin\clangTidy.dll+0x20a5)
#25 0x000000005c04fa0f clang::tooling::ToolInvocation::runInvocation(char
const*, clang::driver::Compilation*,
std::shared_ptr<clang::CompilerInvocation>,
std::shared_ptr<clang::PCHContainerOperations>)
(Z:\Workspace\dist\bin\clangTooling.dll+0x1fa0f)
#26 0x000000005c0532fe clang::tooling::ToolInvocation::run()
(Z:\Workspace\dist\bin\clangTooling.dll+0x232fe)
#27 0x000000005c05470f
clang::tooling::ClangTool::run(clang::tooling::ToolAction*)
(Z:\Workspace\dist\bin\clangTooling.dll+0x2470f)
#28 0x0000000060f18193
clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&,
clang::tooling::CompilationDatabase const&,
llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > >,
llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, llvm::StringRef)
(Z:\Workspace\dist\bin\clangTidy.dll+0x8193)
#29 0x0000000074735b2a clang::tidy::clangTidyMain(int, char const**)
(Z:\Workspace\dist\bin\clangTidyMain.dll+0x5b2a)
#30 0x00000000004013c7 __tmainCRTStartup
./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt\./mingw-w64-crt/crt\crtexe.c:341:0
#31 0x00000000004014fb mainCRTStartup
./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt\./mingw-w64-crt/crt\crtexe.c:225:0
#32 0x0000000076fc652d (C:\Windows\system32\kernel32.dll+0x1652d)
#33 0x00000000770fc521 (C:\Windows\SYSTEM32\ntdll.dll+0x2c521)

-- 
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/20210628/4fd27f70/attachment-0001.html>


More information about the llvm-bugs mailing list