[PATCH] D105320: [CodeView] Saturate values bigger than supported by APInt.
Matheus Izvekov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 26 14:52:25 PDT 2021
mizvekov added a comment.
I received this report from one of the bots: https://lab.llvm.org/buildbot/#/builders/5/builds/9633/steps/13/logs/stdio
`
FAIL: Clang :: CodeGenCXX/debug-info-enum-i128.cpp (5356 of 77963)
******************** TEST 'Clang :: CodeGenCXX/debug-info-enum-i128.cpp' FAILED ********************
Script:
--
: 'RUN: at line 1'; /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/lib/clang/13.0.0/include -nostdsysteminc /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/CodeGenCXX/debug-info-enum-i128.cpp -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -emit-llvm -o - | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
: 'RUN: at line 2'; /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/lib/clang/13.0.0/include -nostdsysteminc /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/CodeGenCXX/debug-info-enum-i128.cpp -triple x86_64-linux-gnu -debug-info-kind=limited -emit-llvm -o - | /b/sanitizer-x86_64-linux-fast/build/llvm_build_asan/bin/FileCheck /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/CodeGenCXX/debug-info-enum-i128.cpp
--
Exit Code: 1
Command Output (stderr):
--
=================================================================
==22208==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x72240dd in operator new[](unsigned long) /b/s/w/ir/cache/builder/src/third_party/llvm/compiler-rt/lib/asan/asan_new_delete.cpp:98:3
#1 0xe21510a in getMemory /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/APInt.cpp:46:10
#2 0xe21510a in llvm::APInt::initSlowCase(llvm::APInt const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/APInt.cpp:87:12
#3 0x164a460b in APInt /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/APInt.h:321:7
#4 0x164a460b in APSInt /b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/APSInt.h:22:22
#5 0x164a460b in EnumConstantDecl /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/include/clang/AST/Decl.h:3048:62
#6 0x164a460b in clang::EnumConstantDecl::Create(clang::ASTContext&, clang::EnumDecl*, clang::SourceLocation, clang::IdentifierInfo*, clang::QualType, clang::Expr*, llvm::APSInt const&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/Decl.cpp:4916:22
#7 0x14605da3 in clang::Sema::CheckEnumConstant(clang::EnumDecl*, clang::EnumConstantDecl*, clang::SourceLocation, clang::IdentifierInfo*, clang::Expr*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:17905:10
#8 0x14607d80 in clang::Sema::ActOnEnumConstant(clang::Scope*, clang::Decl*, clang::Decl*, clang::SourceLocation, clang::IdentifierInfo*, clang::ParsedAttributesView const&, clang::SourceLocation, clang::Expr*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:17970:5
#9 0x13ead361 in clang::Parser::ParseEnumBody(clang::SourceLocation, clang::Decl*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:4855:35
#10 0x13e9f97b in clang::Parser::ParseEnumSpecifier(clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:4774:5
#11 0x13e7e7e3 in clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:3999:7
#12 0x13d47ec6 in clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/Parser.cpp:1045:3
#13 0x13d47183 in clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/Parser.cpp:1153:12
#14 0x13d4305f in clang::Parser::ParseExternalDeclaration(clang::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/Parser.cpp:975:12
#15 0x13d3bcb8 in clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/Parser.cpp:720:12
#16 0x13d22d2c in clang::ParseAST(clang::Sema&, bool, bool) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Parse/ParseAST.cpp:158:20
#17 0x10592b4c in clang::CodeGenAction::ExecuteAction() /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1044:30
#18 0x102ed574 in clang::FrontendAction::Execute() /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:951:8
#19 0x101044b0 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:974:33
#20 0x105808e0 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278:25
#21 0x7237834 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/tools/driver/cc1_main.cpp:246:15
#22 0x723059f in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/tools/driver/driver.cpp:338:12
#23 0x722e6f4 in main /b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/tools/driver/driver.cpp:415:12
#24 0x7fc40b7e809a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
SUMMARY: AddressSanitizer: 32 byte(s) leaked in 2 allocation(s).
`
The error is happening on the test created for D106585 <https://reviews.llvm.org/D106585> though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105320/new/
https://reviews.llvm.org/D105320
More information about the cfe-commits
mailing list