[LLVMbugs] [Bug 17415] New: Three crashes on simple test-cases

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 30 07:40:15 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17415

            Bug ID: 17415
           Summary: Three crashes on simple test-cases
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: octoploid at yandex.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

1)
markus at x4 clang_bugs % cat test1.ii
int i = (int) { i };

markus at x4 clang_bugs % clang++ test1.ii
test1.ii:1:17: warning: variable 'i' is uninitialized when used within its own
initialization [-Wuninitialized]
int i = (int) { i };
    ~           ^
0  clang-3.4       0x0000000000fc47f2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang-3.4       0x0000000000fc43c4
2  libpthread.so.0 0x00007fcf578ca820
3  clang-3.4       0x0000000000eba111 llvm::LoadInst::LoadInst(llvm::Value*,
char const*, bool, llvm::Instruction*) + 49
4  clang-3.4       0x00000000010c1d2d
clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(llvm::Value*, bool, unsigned
int, clang::QualType, llvm::MDNode*, clang::QualType, unsigned long) + 125
5  clang-3.4       0x00000000010c2389
clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(clang::CodeGen::LValue) + 57
6  clang-3.4       0x00000000010c255e
clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(clang::CodeGen::LValue) + 462
7  clang-3.4       0x00000000010df017
8  clang-3.4       0x00000000010e7a49
9  clang-3.4       0x00000000010e891d
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 61
10 clang-3.4       0x00000000010a738f
clang::CodeGen::CodeGenFunction::EmitScalarInit(clang::Expr const*,
clang::ValueDecl const*, clang::CodeGen::LValue, bool) + 767
11 clang-3.4       0x00000000010b0d0e
clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(clang::VarDecl
const&, llvm::Constant*, bool) + 1406
12 clang-3.4       0x00000000010b0eac
clang::CodeGen::CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc(llvm::Function*,
clang::VarDecl const*, llvm::GlobalVariable*, bool) + 252
13 clang-3.4       0x00000000010b141c
clang::CodeGen::CodeGenModule::EmitCXXGlobalVarDeclInitFunc(clang::VarDecl
const*, llvm::GlobalVariable*, bool) + 236
14 clang-3.4       0x000000000103ad5b
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*) +
859
15 clang-3.4       0x000000000103b066
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 118
16 clang-3.4       0x000000000103bd7c
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 1276
17 clang-3.4       0x000000000103c1a3
18 clang-3.4       0x0000000000fe66c3
19 clang-3.4       0x0000000000fe5efc
20 clang-3.4       0x0000000001271d76 clang::ParseAST(clang::Sema&, bool, bool)
+ 326
21 clang-3.4       0x00000000011c0da9 clang::FrontendAction::Execute() + 169
22 clang-3.4       0x00000000011a30e8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 296
23 clang-3.4       0x0000000000fc7d0a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1402
24 clang-3.4       0x00000000006dcb88 cc1_main(char const**, char const**, char
const*, void*) + 824
25 clang-3.4       0x00000000006c77c9 main + 9193
26 libc.so.6       0x00007fcf572e4a75 __libc_start_main + 245
27 clang-3.4       0x00000000006dbdc2
Stack dump:
0.      Program arguments: /usr/local/bin/clang-3.4 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name test1.ii -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -resource-dir
/usr/local/bin/../lib/clang/3.4 -fdeprecated-macro -fdebug-compilation-dir
/var/tmp/clang_bugs -ferror-limit 19 -fmessage-length 174 -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-slp -o /tmp/test1-d1da71.o -x c++-cpp-output
test1.ii 
1.      <eof> parser at end of file
2.      test1.ii:1:5: LLVM IR generation of declaration 'i'
3.      test1.ii:1:5: Generating code for declaration 'i'
clang-3.4: error: unable to execute command: Segmentation fault
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (http://llvm.org/git/clang.git
f78bf4a0132a3ea366ba3baadd9d6af26c617d11) (http://llvm.org/git/llvm.git
835e284214c6e920924b5375590e77fd953cbefe)
Target: x86_64-unknown-linux-gnu
Thread model: posix

2)
markus at x4 clang_bugs % cat test2.ii

class c1 {
public:
  virtual void foo();
};
class c2 {
  virtual void method5();
};
class A : c1, c2 {
  __attribute__((__stdcall__)) void method5() {}
};
A c3_instance;

markus at x4 clang_bugs % clang++ -c -O2 test2.ii
test2.ii:10:18: warning: calling convention '__stdcall__' ignored for this
target [-Wignored-attributes]
  __attribute__((__stdcall__)) void method5() {}
                 ^
0  clang-3.4       0x0000000000fc47f2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang-3.4       0x0000000000fc43c4
2  libpthread.so.0 0x00007fd20f711820
3  clang-3.4       0x00000000010470d3
clang::CodeGen::CodeGenTypes::isFuncTypeArgumentConvertible(clang::QualType) +
19
4  clang-3.4       0x0000000001047247
clang::CodeGen::CodeGenTypes::isFuncTypeConvertible(clang::FunctionType const*)
+ 23
5  clang-3.4       0x000000000101fec6
clang::CodeGen::CodeGenVTables::MaybeEmitThunkAvailableExternally(clang::GlobalDecl,
clang::ThunkInfo const&) + 70
6  clang-3.4       0x0000000001020467
clang::CodeGen::CodeGenVTables::CreateVTableInitializer(clang::CXXRecordDecl
const*, clang::VTableComponent const*, unsigned int, std::pair<unsigned long,
clang::ThunkInfo> const*, unsigned int) + 967
7  clang-3.4       0x00000000010556f1
8  clang-3.4       0x000000000101f1fa
clang::CodeGen::CodeGenModule::EmitDeferredVTables() + 90
9  clang-3.4       0x000000000103b1e8
clang::CodeGen::CodeGenModule::EmitDeferred() + 40
10 clang-3.4       0x000000000103b279 clang::CodeGen::CodeGenModule::Release()
+ 9
11 clang-3.4       0x0000000000fe6330
12 clang-3.4       0x0000000001271f55 clang::ParseAST(clang::Sema&, bool, bool)
+ 805
13 clang-3.4       0x00000000011c0da9 clang::FrontendAction::Execute() + 169
14 clang-3.4       0x00000000011a30e8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 296
15 clang-3.4       0x0000000000fc7d0a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1402
16 clang-3.4       0x00000000006dcb88 cc1_main(char const**, char const**, char
const*, void*) + 824
17 clang-3.4       0x00000000006c77c9 main + 9193
18 libc.so.6       0x00007fd20f12ba75 __libc_start_main + 245
19 clang-3.4       0x00000000006dbdc2
Stack dump:
0.      Program arguments: /usr/local/bin/clang-3.4 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-main-file-name test2.ii -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -coverage-file /var/tmp/clang_bugs/test2.o
-resource-dir /usr/local/bin/../lib/clang/3.4 -O2 -fdeprecated-macro
-fdebug-compilation-dir /var/tmp/clang_bugs -ferror-limit 19 -fmessage-length
174 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-o test2.o -x c++-cpp-output test2.ii 
1.      <eof> parser at end of file
2.      Per-file LLVM IR generation
clang-3.4: error: unable to execute command: Segmentation fault
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (http://llvm.org/git/clang.git
f78bf4a0132a3ea366ba3baadd9d6af26c617d11) (http://llvm.org/git/llvm.git
835e284214c6e920924b5375590e77fd953cbefe)
Target: x86_64-unknown-linux-gnu
Thread model: posix

3)
markus at x4 clang_bugs % cat test3.ii
[[gnu::fastcall]] void f();

markus at x4 clang_bugs % clang++ -c -std=c++11 test3.ii
test3.ii:1:3: warning: calling convention 'fastcall' ignored for this target
[-Wignored-attributes]
[[gnu::fastcall]] void f();
  ^
0  clang-3.4       0x0000000000fc47f2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang-3.4       0x0000000000fc43c4
2  libpthread.so.0 0x00007f4b216e2820
3  clang-3.4       0x00000000015f5fe4
4  clang-3.4       0x00000000015fae75
clang::Sema::GetTypeSourceInfoForDeclarator(clang::Declarator&,
clang::QualType, clang::TypeSourceInfo*) + 341
5  clang-3.4       0x000000000160554c
6  clang-3.4       0x0000000001607e30
clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) + 352
7  clang-3.4       0x00000000013afdff
clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&,
llvm::MutableArrayRef<clang::TemplateParameterList*>) + 815
8  clang-3.4       0x00000000013b08d5
clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) + 21
9  clang-3.4       0x0000000001280b19
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&) + 73
10 clang-3.4       0x000000000128b2bd
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1773
11 clang-3.4       0x00000000012774ad
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 237
12 clang-3.4       0x0000000001277b19
13 clang-3.4       0x0000000001277b4f
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 31
14 clang-3.4       0x000000000127bc9b
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 267
15 clang-3.4       0x000000000127c572
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 194
16 clang-3.4       0x0000000001271da0 clang::ParseAST(clang::Sema&, bool, bool)
+ 368
17 clang-3.4       0x00000000011c0da9 clang::FrontendAction::Execute() + 169
18 clang-3.4       0x00000000011a30e8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 296
19 clang-3.4       0x0000000000fc7d0a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1402
20 clang-3.4       0x00000000006dcb88 cc1_main(char const**, char const**, char
const*, void*) + 824
21 clang-3.4       0x00000000006c77c9 main + 9193
22 libc.so.6       0x00007f4b210fca75 __libc_start_main + 245
23 clang-3.4       0x00000000006dbdc2
Stack dump:
0.      Program arguments: /usr/local/bin/clang-3.4 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name test3.ii -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -coverage-file
/var/tmp/clang_bugs/test3.o -resource-dir /usr/local/bin/../lib/clang/3.4
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir /var/tmp/clang_bugs
-ferror-limit 19 -fmessage-length 174 -mstackrealign -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-vectorize-slp -o test3.o -x c++-cpp-output test3.ii 
1.      test3.ii:1:27: current parser token ';'
clang-3.4: error: unable to execute command: Segmentation fault
clang-3.4: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (http://llvm.org/git/clang.git
f78bf4a0132a3ea366ba3baadd9d6af26c617d11) (http://llvm.org/git/llvm.git
835e284214c6e920924b5375590e77fd953cbefe)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang-3.4: note: diag

-- 
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/20130930/71e58b13/attachment.html>


More information about the llvm-bugs mailing list