[llvm-bugs] [Bug 24515] New: Crash on using invalid namespace in Obj-C parameter

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 19 20:12:34 PDT 2015


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

            Bug ID: 24515
           Summary: Crash on using invalid namespace in Obj-C parameter
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Nicos-MacBook-Pro-6:delta thakis$ cat repro.mm
namespace n1 {
class Type;
}
@interface N
- (void)foo:(n2::Type *)param;
@end
Nicos-MacBook-Pro-6:delta thakis$ /Users/thakis/src/llvm-build/bin/clang -c
repro.mm
repro.mm:5:14: error: use of undeclared identifier 'n2'
- (void)foo:(n2::Type *)param;
             ^
Assertion failed: (!isAnnotation() && "getIdentifierInfo() on an annotation
token!"), function getIdentifierInfo, file
/Users/thakis/src/llvm-rw/tools/clang/include/clang/Lex/Token.h, line 181.
0  clang-3.5                0x0000000106782289
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 57
1  clang-3.5                0x0000000106782dbb SignalHandler(int) + 779
2  libsystem_platform.dylib 0x00007fff8d65bf1a _sigtramp + 26
3  libsystem_platform.dylib 0x0000000000000003 _sigtramp + 1922711811
4  clang-3.5                0x00000001067829f6 abort + 22
5  clang-3.5                0x00000001067829d1 __assert_rtn + 81
6  clang-3.5                0x00000001071232fd
clang::Parser::isObjCInstancetype() + 429
7  clang-3.5                0x0000000107164f86
clang::Parser::ParseObjCTypeName(clang::ObjCDeclSpec&,
clang::Declarator::TheContext, clang::ParsedAttributes*) + 454
8  clang-3.5                0x0000000107162820
clang::Parser::ParseObjCMethodDecl(clang::SourceLocation,
clang::tok::TokenKind, clang::tok::ObjCKeywordKind, bool) + 1424
9  clang-3.5                0x0000000107160591
clang::Parser::ParseObjCInterfaceDeclList(clang::tok::ObjCKeywordKind,
clang::Decl*) + 433
10 clang-3.5                0x000000010715c2db
clang::Parser::ParseObjCAtInterfaceDeclaration(clang::SourceLocation,
clang::ParsedAttributes&) + 1851
11 clang-3.5                0x000000010715b553
clang::Parser::ParseObjCAtDirectives() + 531
12 clang-3.5                0x0000000107198b1a
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1178
13 clang-3.5                0x000000010719854c
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 524
14 clang-3.5                0x00000001070fd9a6 clang::ParseAST(clang::Sema&,
bool, bool) + 390
15 clang-3.5                0x0000000106a3114b
clang::CodeGenAction::ExecuteAction() + 123
16 clang-3.5                0x0000000106bc06fb clang::FrontendAction::Execute()
+ 75
17 clang-3.5                0x0000000106b8c0fc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 972
18 clang-3.5                0x0000000106c0391b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4043
19 clang-3.5                0x00000001055ff727 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1175
20 clang-3.5                0x00000001055fe325 main + 11349
21 libdyld.dylib            0x00007fff849b25c9 start + 1
Stack dump:
0.    Program arguments: /Users/thakis/src/llvm-build/bin/clang-3.5 -cc1
-triple x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free
-main-file-name repro.mm -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 241.9 -dwarf-column-info -coverage-file
/Users/thakis/src/delta/repro.mm -resource-dir
/Users/thakis/src/llvm-build/bin/../lib/clang/3.7.0 -stdlib=libc++
-fdeprecated-macro -fdebug-compilation-dir /Users/thakis/src/delta
-ferror-limit 19 -fmessage-length 229 -stack-protector 1 -mstackrealign
-fblocks -fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature
-fobjc-exceptions -fcxx-exceptions -fexceptions -fmax-type-align=16
-fdiagnostics-show-option -fcolor-diagnostics -o repro.o -x objective-c++
repro.mm 
1.    repro.mm:5:14: at annotation token
clang-3.5: error: unable to execute command: Illegal instruction: 4
clang-3.5: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.7.0 (trunk 241955)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
clang-3.5: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-3.5: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-3.5: note: diagnostic msg:
/var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/repro-96d79d.mm
clang-3.5: note: diagnostic msg:
/var/folders/c5/8d7sdn1x2mg92mj0rndghhdr0000gn/T/repro-96d79d.sh
clang-3.5: note: diagnostic msg: 

********************

-- 
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/20150820/15c6a168/attachment-0001.html>


More information about the llvm-bugs mailing list