llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.11k stars 12.01k forks source link

Metal internal compiler error #23780

Closed llvmbot closed 9 years ago

llvmbot commented 9 years ago
Bugzilla Link 23406
Resolution INVALID
Resolved on May 04, 2015 12:20
Version unspecified
OS MacOS X
Attachments Metal Shader File that causes the error, As requested from error message the metal file, As requested from error message the sh file
Reporter LLVM Bugzilla Contributor

Extended Description

Recently tried to compile an autogenerated metal shader and got an internal compiler error and a notice that I should report a bug. The used metal shader is assigend as attachment and here comes the stack trace:

STACK TRACE:

$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/bin/metal metalshader.metal -std=ios-metal1.0 metalshader.metal:284:16: warning: unused variable 'normalDirL' [-Wunused-variable] const half3 normalDirL = in.v_normalDirL; ^ metalshader.metal:291:10: warning: unused variable 'diffuseLight' [-Wunused-variable] float3 diffuseLight = float3(0.0,0.0,0.0); ^ metalshader.metal:255:9: warning: unused variable 'ambientocclusionTexel' [-Wunused-variable] half ambientocclusionTexel = ambientocclusionTexture.a; ^ metalshader.metal:253:9: warning: unused variable 'glossTexel' [-Wunused-variable] half glossTexel = half(materialUniforms.Gloss_Amount); ^ metalshader.metal:104:25: warning: unused variable 'MAX_LIGHTS' [-Wunused-const-variable] constexpr constant uint MAX_LIGHTS = 0; ^ 0 metal 0x000000010c8c6a68 llvm::SmallVectorImpl::swap(llvm::SmallVectorImpl&) + 14488 1 metal 0x000000010c8c6e54 llvm::SmallVectorImpl::swap(llvm::SmallVectorImpl&) + 15492 2 libsystem_platform.dylib 0x00007fff87039f1a _sigtramp + 26 3 metal 0x000000010c907b95 bool std::__1::__insertion_sort_incomplete*>(std::__1::pair*, std::__1::pair*, llvm::less_first&) + 32581 4 metal 0x000000010ce7ff15 std::__1::__split_buffer >, llvm::mapped_iterator*>, std::__1::pointer_to_unary_function, llvm::CallGraphNode*> > >, std::__1::allocator >, llvm::mapped_iterator*>, std::__1::pointer_to_unary_function, llvm::CallGraphNode*> > > >&>::~__split_buffer() + 1711 5 metal 0x000000010c568dc6 std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::destroy(std::__1::__tree_node, void*>*) + 2726 6 metal 0x000000010c4a643f void llvm::DeleteContainerSeconds > >(llvm::DenseMap >&) + 31599 7 metal 0x000000010cc4e51f std::__1::__vector_base >::~__vector_base() + 64371 8 metal 0x000000010cd10a11 llvm::SmallVectorTemplateBase >, false>::grow(unsigned long) + 11685 9 metal 0x000000010ce80736 std::__1::__split_buffer >, llvm::mapped_iterator*>, std::__1::pointer_to_unary_function, llvm::CallGraphNode*> > >, std::__1::allocator >, llvm::mapped_iterator*>, std::__1::pointer_to_unary_function, llvm::CallGraphNode*> > > >&>::~__split_buffer() + 3792 10 metal 0x000000010cd0fd3a llvm::SmallVectorTemplateBase >, false>::grow(unsigned long) + 8398 11 metal 0x000000010ce04b00 std::__1::__tree, std::__1::__map_value_compare, std::__1::less, true>, std::__1::allocator > >::destroy(std::__1::__tree_node, void*>*) + 4720 12 metal 0x000000010cde16c6 std::__1::__vector_base >::~__vector_base() + 13966 13 metal 0x000000010ce2d349 char const* std::__1::__search&, char const*, char const*>(char const*, char const*, char const*, char const*, std::__1::__equal_to&, std::__1::random_access_iterator_tag, std::__1::random_access_iterator_tag) + 3609 14 metal 0x000000010be9aa54 std::__1::vector, std::__1::allocator >, std::__1::allocator, std::__1::allocator > > >::deallocate() + 3092 15 metal 0x000000010be9d236 std::__1::__vector_base, std::__1::allocator > >::~__vector_base() + 8070 16 libdyld.dylib 0x00007fff88ecd5c9 start + 1 metal: error: unable to execute command: Segmentation fault: 11 metal: error: clang frontend command failed due to signal (use -v to see invocation) LLVM version 3.5 Target: air64-apple-darwin14.3.0 Thread model: posix metal: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. metal: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: metal: note: diagnostic msg: /var/folders/qy/414mvr4108s6_0n26mcs8pn80000gn/T/metalshader-f75c5a.metal metal: note: diagnostic msg: /var/folders/qy/414mvr4108s6_0n26mcs8pn80000gn/T/metalshader-f75c5a.sh metal: note: diagnostic msg: ******************** $ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/bin/metal --version LLVM version 3.5 Target: x86_64-apple-darwin14.3.0 Thread model: posix
llvmbot commented 9 years ago

FYI: It is now reported at "bugreport.apple.com" as bug report number 20801187

llvmbot commented 9 years ago

crash in Apple's "metal" shader compiler

As "metal" is not part of the LLVM project, but a tool created by Apple for their Metal API, I think that this bug should be filed with Apple at https://bugreport.apple.com/ [*]

I'm closing this as invalid. However please feel free to reopen if you disagree.

[*] Despite the misleading "PLEASE submit a bug report to http://llvm.org/bugs/" (which Apple should really fix).