[LLVMbugs] [Bug 17987] New: openclc crashes
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Nov 18 18:02:19 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=17987
Bug ID: 17987
Summary: openclc crashes
Product: clang
Version: 3.2
Hardware: Macintosh
OS: MacOS X
Status: NEW
Keywords: compile-fail, crash-on-invalid
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: jstottsj at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 11564
--> http://llvm.org/bugs/attachment.cgi?id=11564&action=edit
Sample source code that causes the crash
Compiling OpenCL kernel under Xcode causes a compiler crash.
Offending source code is attached as a file.
Additional information from the Xcode console follows
BACKTRACE:
========================================================
CreateBitcode CLMD5/testKernel.cl i386
cd /Users/jstott/Developer/GPU
/System/Library/Frameworks/OpenCL.framework/Libraries/openclc -x cl
-cl-std=CL1.2 -Os -iquote
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-generated-files.hmap
-I/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-own-target-headers.hmap
-I/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-all-target-headers.hmap
-iquote
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-project-headers.hmap
-I/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug/include
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/DerivedSources/x86_64
-I/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/DerivedSources
-F/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug
-arch i386 -emit-llvm -c /Users/jstott/Developer/GPU/CLMD5/testKernel.cl -o
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug/CLMD5.framework/Versions/A/Resources/OpenCL/testKernel.cl.i386.bc
0 libLLVMContainer.dylib 0x00007fff8e84a265 PrintStackTrace(void*) + 37
1 libLLVMContainer.dylib 0x00007fff8e84a694 SignalHandler(int) + 452
2 libsystem_platform.dylib 0x00007fff96d5d5aa _sigtramp + 26
3 libsystem_platform.dylib 0x00007fff568df3f8 _sigtramp + 18446744072631098984
4 openclc 0x00000001094d8cb3
clang::CodeGen::CodeGenFunction::EmitExtVectorElementExpr(clang::ExtVectorElementExpr
const*) + 907
5 openclc 0x00000001094d539a
clang::CodeGen::CodeGenFunction::EmitLValue(clang::Expr const*) + 504
6 openclc 0x00000001094d6fb4
clang::CodeGen::CodeGenFunction::EmitCheckedLValue(clang::Expr const*,
clang::CodeGen::CodeGenFunction::TypeCheckKind) + 28
7 openclc 0x00000001094ee5bd
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 15905
8 openclc 0x00000001094ee19a
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 14846
9 openclc 0x00000001094f107c
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 26848
10 openclc 0x00000001094ee3d8
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 15420
11 openclc 0x00000001094f10e0
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 26948
12 openclc 0x00000001094ee3d8
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 15420
13 openclc 0x00000001094ee011
clang::CodeGen::CodeGenFunction::EmitCompoundAssignmentLValue(clang::CompoundAssignOperator
const*) + 14453
14 openclc 0x00000001094e934c
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 72
15 openclc 0x00000001094d512d
clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr const*,
clang::CodeGen::AggValueSlot, bool) + 135
16 openclc 0x00000001094d50a0
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*) + 58
17 openclc 0x00000001095216e1
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 109
18 openclc 0x0000000109524b24
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 180
19 openclc 0x0000000109521b10
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 200
20 openclc 0x0000000109521689
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 21
21 openclc 0x000000010952262c
clang::CodeGen::CodeGenFunction::EmitForStmt(clang::ForStmt const&) + 698
22 openclc 0x0000000109524b24
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 180
23 openclc 0x0000000109521b10
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 200
24 openclc 0x0000000109521689
clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*) + 21
25 openclc 0x0000000109529dfa
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 638
26 openclc 0x000000010952f84b
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 1417
27 openclc 0x000000010952e1c6
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 220
28 openclc 0x000000010952eee6
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 384
29 openclc 0x000000010953250f
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 283
30 openclc 0x000000010953fc3c
clang::CreateLLVMCodeGen(clang::DiagnosticsEngine&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, clang::CodeGenOptions const&,
llvm::LLVMContext&) + 740
31 openclc 0x0000000109553b0a
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 156
32 openclc 0x0000000109669c66 clang::ParseAST(clang::Sema&,
bool, bool) + 282
33 openclc 0x0000000109553207
clang::CodeGenAction::ExecuteAction() + 191
34 openclc 0x00000001095d3d4a clang::FrontendAction::Execute()
+ 124
35 openclc 0x00000001095be45e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 448
36 openclc 0x0000000109323753
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2963
37 openclc 0x000000010931865c cc1_main(char const**, char
const**, char const*, void*) + 1516
38 openclc 0x000000010931d0f1 main + 2398
39 libdyld.dylib 0x00007fff8db365fd start + 1
40 libdyld.dylib 0x0000000000000038 start + 18446603338138819132
Stack dump:
0. Program arguments:
/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/openclc -cc1
-triple i386-apple-macosx10.9.0 -emit-llvm-bc -disable-free
-disable-llvm-verifier -main-file-name testKernel.cl -pic-level 2
-mdisable-fp-elim -masm-verbose -target-cpu yonah -target-linker-version 133.3
-coverage-file
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug/CLMD5.framework/Versions/A/Resources/OpenCL/testKernel.cl.i386.bc
-resource-dir
/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/../lib/clang/3.2
-iquote
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-generated-files.hmap
-iquote
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-project-headers.hmap
-I
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-own-target-headers.hmap
-I
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/CLMD5-all-target-headers.hmap
-I
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug/include
-I
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
-I
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/DerivedSources/x86_64
-I
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Intermediates/GPU.build/Debug/CLMD5.build/DerivedSources
-F/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug
-fmodule-cache-path
/var/folders/85/_z9hb9fx1113qx0frnvj68800000gp/T/clang-module-cache -Os
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fblocks
-fobjc-runtime=macosx-fragile-10.9.0 -fobjc-default-synthesize-properties
-fdiagnostics-show-option -o
/Users/jstott/Library/Developer/Xcode/DerivedData/GPU-dwqcmmwdxganwlhfxakovdekkgdf/Build/Products/Debug/CLMD5.framework/Versions/A/Resources/OpenCL/testKernel.cl.i386.bc
-x cl /Users/jstott/Developer/GPU/CLMD5/testKernel.cl -cl-std=CL1.2
1. <eof> parser at end of file
2. /Users/jstott/Developer/GPU/CLMD5/testKernel.cl:8:13: LLVM IR generation
of declaration 'test'
3. /Users/jstott/Developer/GPU/CLMD5/testKernel.cl:8:13: Generating code for
declaration 'test'
4. /Users/jstott/Developer/GPU/CLMD5/testKernel.cl:10:1: LLVM IR generation
of compound statement ('{}')
5. /Users/jstott/Developer/GPU/CLMD5/testKernel.cl:21:27: LLVM IR generation
of compound statement ('{}')
openclc: error: unable to execute command: Segmentation fault: 11
openclc: error: clang frontend command failed due to signal (use -v to see
invocation)
LLVM version 3.2
Target: i386-apple-darwin13.0.0
Thread model: posix
openclc: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
openclc: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
openclc: note: diagnostic msg:
/var/folders/85/_z9hb9fx1113qx0frnvj68800000gp/T/testKernel-GezUfB.cl
openclc: note: diagnostic msg:
/var/folders/85/_z9hb9fx1113qx0frnvj68800000gp/T/testKernel-GezUfB.sh
openclc: note: diagnostic msg:
********************
Command /System/Library/Frameworks/OpenCL.framework/Libraries/openclc failed
with exit code 254
========================================================
Run script
========================================================
/var/folders/85/_z9hb9fx1113qx0frnvj68800000gp/T/testKernel-GezUfB.sh
/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/openclc -cc1
-triple i386-apple-macosx10.9.0 -emit-llvm-bc -disable-free
-disable-llvm-verifier -main-file-name testKernel.cl -pic-level 2
-mdisable-fp-elim -masm-verbose -target-cpu yonah -target-linker-version 133.3
-Os -ferror-limit 19 -fmessage-length 0 -mstackrealign -fblocks
-fobjc-runtime=macosx-fragile-10.9.0 -fobjc-default-synthesize-properties
-fdiagnostics-show-option -x cl testKernel-GezUfB.cl -cl-std=CL1.2
========================================================
Pre-processed source code
========================================================
[I tried to submit the pre-processed source, but the system complained that the
submission was too long. Anyway, the my source code, trimmed for clarity, is
attached as a file].
--
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/20131119/ad700f80/attachment.html>
More information about the llvm-bugs
mailing list