Re: r281351 - Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.
Manman, FYI, It appears that some of your ObjC commits today trigger asan error. Sanitizer bots are broken by PR30341, so they don't report the issue yet. --Artem $ llvm/tools/clang/clang -cc1 -internal-isystem llvm/tools/clang/staging/include -nostdsysteminc -fblocks -fsyntax-only -Wnullable-to-nonnull-conversion llvm/tools/clang/test/SemaObjC/parameterized_classes_subst.m -verify = ==223101==ERROR: AddressSanitizer: use-after-poison on address 0x62191288 at pc 0x01a02b3f bp 0x7f2996f0 sp 0x7f2996e8 WRITE of size 4 at 0x62191288 thread T0 #0 0x1a02b3e in clang::ObjCTypeParamTypeLoc::setProtocolRAngleLoc(clang::SourceLocation) third_party/llvm/llvm/tools/clang/include/clang/AST/TypeLoc.h:737:55 #1 0x213f86b in clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(clang::Scope*, clang::SourceLocation, clang::OpaquePtr, clang::SourceLocation, llvm::ArrayRef >, clang::SourceLocation, clang::SourceLocation, llvm::ArrayRef, llvm::ArrayRef, clang::SourceLocation) third_party/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:1165:13 #2 0x2060347 in clang::Parser::parseObjCTypeArgsAndProtocolQualifiers(clang::SourceLocation, clang::OpaquePtr, bool, clang::SourceLocation&) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1878:18 #3 0x1ffca6f in clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, clang::CXXScopeSpec&, bool) third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:1770:13 #4 0x1ffd4fc in clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:1733:10 #5 0x20df910 in clang::Parser::isTypeSpecifierQualifier() third_party/llvm/llvm/tools/clang/lib/Parse/ParseDecl.cpp:4381:9 #6 0x205ecf5 in clang::Parser::ParseObjCTypeName(clang::ObjCDeclSpec&, clang::Declarator::TheContext, clang::ParsedAttributes*) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1274:7 #7 0x205c8f9 in clang::Parser::ParseObjCMethodDecl(clang::SourceLocation, clang::tok::TokenKind, clang::tok::ObjCKeywordKind, bool) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1428:22 #8 0x2058e8b in clang::Parser::ParseObjCInterfaceDeclList(clang::tok::ObjCKeywordKind, clang::Decl*) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:633:11 #9 0x2053154 in clang::Parser::ParseObjCAtInterfaceDeclaration(clang::SourceLocation, clang::ParsedAttributes&) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:388:3 #10 0x2051fa9 in clang::Parser::ParseObjCAtDirectives() third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:63:18 #11 0x1ff7871 in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:757:12 #12 0x1ff6c61 in clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&) third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:628:12 #13 0x1ff016d in clang::ParseAST(clang::Sema&, bool, bool) third_party/llvm/llvm/tools/clang/lib/Parse/ParseAST.cpp:147:18 #14 0x1ab05d3 in clang::FrontendAction::Execute() third_party/llvm/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:458:8 #15 0x184fbd6 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) third_party/llvm/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:871:11 #16 0x5c6f47 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) third_party/llvm/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:249:25 #17 0x5a114d in cc1_main(llvm::ArrayRef, char const*, void*) third_party/llvm/llvm/tools/clang/tools/driver/cc1_main.cpp:183:13 #18 0x5bb3f6 in ExecuteCC1Tool(llvm::ArrayRef, llvm::StringRef) third_party/llvm/llvm/tools/clang/tools/driver/driver.cpp:299:12 #19 0x5ba314 in main third_party/llvm/llvm/tools/clang/tools/driver/driver.cpp:380:12 0x62191288 is located 392 bytes inside of 4096-byte region [0x62191100,0x62192100) allocated by thread T0 here: #0 0x58a52c in __interceptor_malloc third_party/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:64:3 #1 0x5a5d0b in llvm::MallocAllocator::Allocate(unsigned long, unsigned long) third_party/llvm/llvm/include/llvm/Support/Allocator.h:95:12 #2 0x691b67 in llvm::BumpPtrAllocatorImpl::StartNewSlab() third_party/llvm/llvm/include/llvm/Support/Allocator.h:324:31 #3 0x6916aa in llvm::BumpPtrAllocatorImpl::Allocate(unsigned long, unsigned long) third_party/llvm/llvm/include/llvm/Support/Allocator.h:249:5 #4 0x6913d1 in clang::ASTContext::Allocate(unsigned long, unsigned int) const third_party/llvm/llvm/tools/clang/include/clang/AST/ASTContext.h:588:22 #5 0x3010c16 in clang::ObjCInterfaceDecl::Create(clang::ASTContext const&, clang::DeclContext*, clang::SourceLocation, clang::IdentifierInfo*, clang::ObjCTypeParamList*, clang::ObjCInterfaceDecl*, clang::SourceLocation, bool) third_party/llvm/llvm/tools/clang/lib/AST
Re: r281351 - Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.
I checked in r281404. Hopefully it will fix the issue. Let me know if it does not. Thanks, Manman > On Sep 13, 2016, at 3:03 PM, Artem Belevich via cfe-commits > wrote: > > Manman, > > FYI, It appears that some of your ObjC commits today trigger asan error. > Sanitizer bots are broken by PR30341, so they don't report the issue yet. > > --Artem > > $ llvm/tools/clang/clang -cc1 -internal-isystem > llvm/tools/clang/staging/include -nostdsysteminc -fblocks -fsyntax-only > -Wnullable-to-nonnull-conversion > llvm/tools/clang/test/SemaObjC/parameterized_classes_subst.m -verify > = > ==223101==ERROR: AddressSanitizer: use-after-poison on address 0x62191288 > at pc 0x01a02b3f bp 0x7f2996f0 sp 0x7f2996e8 > WRITE of size 4 at 0x62191288 thread T0 > #0 0x1a02b3e in > clang::ObjCTypeParamTypeLoc::setProtocolRAngleLoc(clang::SourceLocation) > third_party/llvm/llvm/tools/clang/include/clang/AST/TypeLoc.h:737:55 > #1 0x213f86b in > clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(clang::Scope*, > clang::SourceLocation, clang::OpaquePtr, > clang::SourceLocation, llvm::ArrayRef >, > clang::SourceLocation, clang::SourceLocation, llvm::ArrayRef, > llvm::ArrayRef, clang::SourceLocation) > third_party/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:1165:13 > #2 0x2060347 in > clang::Parser::parseObjCTypeArgsAndProtocolQualifiers(clang::SourceLocation, > clang::OpaquePtr, bool, clang::SourceLocation&) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1878:18 > #3 0x1ffca6f in > clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, bool, > clang::CXXScopeSpec&, bool) > third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:1770:13 > #4 0x1ffd4fc in clang::Parser::TryAnnotateTypeOrScopeToken(bool, bool) > third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:1733:10 > #5 0x20df910 in clang::Parser::isTypeSpecifierQualifier() > third_party/llvm/llvm/tools/clang/lib/Parse/ParseDecl.cpp:4381:9 > #6 0x205ecf5 in clang::Parser::ParseObjCTypeName(clang::ObjCDeclSpec&, > clang::Declarator::TheContext, clang::ParsedAttributes*) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1274:7 > #7 0x205c8f9 in clang::Parser::ParseObjCMethodDecl(clang::SourceLocation, > clang::tok::TokenKind, clang::tok::ObjCKeywordKind, bool) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1428:22 > #8 0x2058e8b in > clang::Parser::ParseObjCInterfaceDeclList(clang::tok::ObjCKeywordKind, > clang::Decl*) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:633:11 > #9 0x2053154 in > clang::Parser::ParseObjCAtInterfaceDeclaration(clang::SourceLocation, > clang::ParsedAttributes&) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:388:3 > #10 0x2051fa9 in clang::Parser::ParseObjCAtDirectives() > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:63:18 > #11 0x1ff7871 in > clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, > clang::ParsingDeclSpec*) > third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:757:12 > #12 0x1ff6c61 in > clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&) > third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:628:12 > #13 0x1ff016d in clang::ParseAST(clang::Sema&, bool, bool) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseAST.cpp:147:18 > #14 0x1ab05d3 in clang::FrontendAction::Execute() > third_party/llvm/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:458:8 > #15 0x184fbd6 in > clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) > third_party/llvm/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:871:11 > #16 0x5c6f47 in > clang::ExecuteCompilerInvocation(clang::CompilerInstance*) > third_party/llvm/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:249:25 > #17 0x5a114d in cc1_main(llvm::ArrayRef, char const*, void*) > third_party/llvm/llvm/tools/clang/tools/driver/cc1_main.cpp:183:13 > #18 0x5bb3f6 in ExecuteCC1Tool(llvm::ArrayRef, > llvm::StringRef) > third_party/llvm/llvm/tools/clang/tools/driver/driver.cpp:299:12 > #19 0x5ba314 in main > third_party/llvm/llvm/tools/clang/tools/driver/driver.cpp:380:12 > > 0x62191288 is located 392 bytes inside of 4096-byte region > [0x62191100,0x62192100) > allocated by thread T0 here: > #0 0x58a52c in __interceptor_malloc > third_party/llvm/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:64:3 > #1 0x5a5d0b in llvm::MallocAllocator::Allocate(unsigned long, unsigned > long) third_party/llvm/llvm/include/llvm/Support/Allocator.h:95:12 > #2 0x691b67 in llvm::BumpPtrAllocatorImpl 4096ul>::StartNewSlab() > third_party/llvm/llvm/include/llvm/Support/Allocator.h:324:31 > #3 0x6916aa in llvm::BumpPtrAllocatorImpl 4096ul>::Allocate(unsigned long, unsigned long) > third_party/llvm/llvm/include/llvm/Support/Allocator.h:249:5 >
Re: r281351 - Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.
Thanks for the quick fix. ASAN is happy now. --Artem On Tue, Sep 13, 2016 at 3:09 PM, Manman wrote: > I checked in r281404. Hopefully it will fix the issue. > > Let me know if it does not. > > Thanks, > Manman > > On Sep 13, 2016, at 3:03 PM, Artem Belevich via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > > Manman, > > FYI, It appears that some of your ObjC commits today trigger asan error. > Sanitizer bots are broken by PR30341, so they don't report the issue yet. > > --Artem > > $ llvm/tools/clang/clang -cc1 -internal-isystem > llvm/tools/clang/staging/include > -nostdsysteminc -fblocks -fsyntax-only -Wnullable-to-nonnull-conversion > llvm/tools/clang/test/SemaObjC/parameterized_classes_subst.m -verify > = > ==223101==ERROR: AddressSanitizer: use-after-poison on address > 0x62191288 at pc 0x01a02b3f bp 0x7f2996f0 sp 0x7f2996e8 > WRITE of size 4 at 0x62191288 thread T0 > #0 0x1a02b3e in clang::ObjCTypeParamTypeLoc:: > setProtocolRAngleLoc(clang::SourceLocation) third_party/llvm/llvm/tools/ > clang/include/clang/AST/TypeLoc.h:737:55 > #1 0x213f86b in > clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers(clang::Scope*, > clang::SourceLocation, clang::OpaquePtr, > clang::SourceLocation, llvm::ArrayRef > >, clang::SourceLocation, clang::SourceLocation, > llvm::ArrayRef, llvm::ArrayRef, > clang::SourceLocation) third_party/llvm/llvm/tools/ > clang/lib/Sema/SemaType.cpp:1165:13 > #2 0x2060347 in clang::Parser::parseObjCTypeArgsAndProtocolQu > alifiers(clang::SourceLocation, clang::OpaquePtr, bool, > clang::SourceLocation&) third_party/llvm/llvm/tools/ > clang/lib/Parse/ParseObjc.cpp:1878:18 > #3 0x1ffca6f in > clang::Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec(bool, > bool, clang::CXXScopeSpec&, bool) third_party/llvm/llvm/tools/ > clang/lib/Parse/Parser.cpp:1770:13 > #4 0x1ffd4fc in clang::Parser::TryAnnotateTypeOrScopeToken(bool, > bool) third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:1733:10 > #5 0x20df910 in clang::Parser::isTypeSpecifierQualifier() > third_party/llvm/llvm/tools/clang/lib/Parse/ParseDecl.cpp:4381:9 > #6 0x205ecf5 in clang::Parser::ParseObjCTypeName(clang::ObjCDeclSpec&, > clang::Declarator::TheContext, clang::ParsedAttributes*) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1274:7 > #7 0x205c8f9 in clang::Parser::ParseObjCMethodDecl(clang::SourceLocation, > clang::tok::TokenKind, clang::tok::ObjCKeywordKind, bool) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:1428:22 > #8 0x2058e8b in > clang::Parser::ParseObjCInterfaceDeclList(clang::tok::ObjCKeywordKind, > clang::Decl*) third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp: > 633:11 > #9 0x2053154 in > clang::Parser::ParseObjCAtInterfaceDeclaration(clang::SourceLocation, > clang::ParsedAttributes&) third_party/llvm/llvm/tools/ > clang/lib/Parse/ParseObjc.cpp:388:3 > #10 0x2051fa9 in clang::Parser::ParseObjCAtDirectives() > third_party/llvm/llvm/tools/clang/lib/Parse/ParseObjc.cpp:63:18 > #11 0x1ff7871 in clang::Parser::ParseExternalDeclaration( > clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) > third_party/llvm/llvm/tools/clang/lib/Parse/Parser.cpp:757:12 > #12 0x1ff6c61 in clang::Parser::ParseTopLevelDecl(clang:: > OpaquePtr&) third_party/llvm/llvm/tools/ > clang/lib/Parse/Parser.cpp:628:12 > #13 0x1ff016d in clang::ParseAST(clang::Sema&, bool, bool) > third_party/llvm/llvm/tools/clang/lib/Parse/ParseAST.cpp:147:18 > #14 0x1ab05d3 in clang::FrontendAction::Execute() > third_party/llvm/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:458:8 > #15 0x184fbd6 in > clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) > third_party/llvm/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:871:11 > #16 0x5c6f47 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) > third_party/llvm/llvm/tools/clang/lib/FrontendTool/ > ExecuteCompilerInvocation.cpp:249:25 > #17 0x5a114d in cc1_main(llvm::ArrayRef, char const*, > void*) third_party/llvm/llvm/tools/clang/tools/driver/cc1_main.cpp:183:13 > #18 0x5bb3f6 in ExecuteCC1Tool(llvm::ArrayRef, > llvm::StringRef) third_party/llvm/llvm/tools/ > clang/tools/driver/driver.cpp:299:12 > #19 0x5ba314 in main third_party/llvm/llvm/tools/ > clang/tools/driver/driver.cpp:380:12 > > 0x62191288 is located 392 bytes inside of 4096-byte region > [0x62191100,0x62192100) > allocated by thread T0 here: > #0 0x58a52c in __interceptor_malloc third_party/llvm/llvm/ > projects/compiler-rt/lib/asan/asan_malloc_linux.cc:64:3 > #1 0x5a5d0b in llvm::MallocAllocator::Allocate(unsigned long, > unsigned long) third_party/llvm/llvm/include/ > llvm/Support/Allocator.h:95:12 > #2 0x691b67 in llvm::BumpPtrAllocatorImpl 4096ul, 4096ul>::StartNewSlab() third_party/llvm/llvm/include/ > llvm/Support/Allocator.h:324:31 > #3 0x6916aa in llvm::BumpPtrAllocato