You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Dec 16, 2015
· 3 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
I have the following function implementation that takes a value parameter of generic type T:
private class func unpackArray<T: BytePressByteArray where T.Generator.Element == UInt8>(value: T, withLength length: UInt) throws -> [AnyObject] {
let range = Range(start: 0, end: UInt32(1))
let a = value[range]
}
Whenever I change the Range generic from Range<Int> to Range<UInt32> (like above), the source editor crashes and all syntax highlighting temporarily disables.
Upon running, I receive the following stack trace with a thrown Segmentation Fault 11:
0 swift 0x0000000109c1833b llvm::sys::PrintStackTrace(__sFILE*) + 43
1 swift 0x0000000109c18a7b SignalHandler(int) + 379
2 libsystem_platform.dylib 0x00007fff960fa52a _sigtramp + 26
3 libsystem_platform.dylib 0x00007fa4ec816e08 _sigtramp + 1450297592
4 swift 0x0000000107ee1c9f (anonymous namespace)::SILGenConformance::visitAbstractStorageDecl(swift::AbstractStorageDecl*) + 31
5 swift 0x0000000107ee166d swift::SILWitnessVisitor<(anonymous namespace)::SILGenConformance>::visitProtocolDecl(swift::ProtocolDecl*) + 509
6 swift 0x0000000107edf035 swift::Lowering::SILGenModule::getWitnessTable(swift::ProtocolConformance*) + 277
7 swift 0x0000000107f2f0d0 SILGenExtension::emitExtension(swift::ExtensionDecl*) + 224
8 swift 0x0000000107f2e9d5 swift::Lowering::SILGenModule::visitExtensionDecl(swift::ExtensionDecl*) + 21
9 swift 0x0000000107eb6e0b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 779
10 swift 0x0000000107eb79c0 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional<unsigned int>, bool, bool) + 928
11 swift 0x0000000107eb7d6d swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional<unsigned int>, bool) + 109
12 swift 0x0000000107d0bb92 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 11442
13 swift 0x0000000107d08cd3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2691
14 swift 0x0000000107d05354 main + 2324
15 libdyld.dylib 0x00007fff87efd5ad start + 1
16 libdyld.dylib 0x000000000000003d start + 2014325393
If I remove the UInt32() in the function unpackArray and revert the UInt32 in the subscript implementation of BytePressByteArray to Int, there is no issue.
The text was updated successfully, but these errors were encountered:
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Environment
XC Version 7.1 (7B91b)
Additional Detail from JIRA
md5: 545f280c44ec4ba7bb035d81f9465adc
Issue Description:
I have the following function implementation that takes a value parameter of generic type T:
BytePressByteArray is defined by
Whenever I change the Range generic from Range<Int> to Range<UInt32> (like above), the source editor crashes and all syntax highlighting temporarily disables.
Upon running, I receive the following stack trace with a thrown Segmentation Fault 11:
If I remove the UInt32() in the function unpackArray and revert the UInt32 in the subscript implementation of BytePressByteArray to Int, there is no issue.
The text was updated successfully, but these errors were encountered: