Crash while compiling a getter

(Pushkar N Kulkarni) #1


I tried to implement NSOrderedSet.reversedOrderSet with this code:

/@NSCopying/ public var reversedOrderedSet: NSOrderedSet {

return NSOrderedSet.init(array: _orderedStorage.reversed())


I’m not sure about the correctness/performance of that implementation, but I see a crash while building Foundation(my local “swift” clone is synced with the master). Here is the stack:


37 swift 0x00000000010a2025 swift::SILModule::constructSIL(swift::ModuleDecl*, swift::SILOptions&, swift::FileUnit*, llvm::Optional, bool, bool) + 581

38 swift 0x00000000010a2637 swift::performSILGeneration(swift::FileUnit&, swift::SILOptions&, llvm::Optional, bool) + 135

39 swift 0x0000000000c212ad

40 swift 0x0000000000c201b8 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 3064

41 swift 0x0000000000c0efc9 main + 3065

42 0x00007f694ff89a40 __libc_start_main + 240

43 swift 0x0000000000c08779 _start + 41

  1.    While emitting SIL for getter for reversedOrderedSet at Foundation/NSOrderedSet.swift:235:64

Is it something already known/reported? Sorry, I haven’t been following much of the conversations on swift-dev.

Thank you!

Pushkar N Kulkarni,

IBM Runtimes

Simplicity is prerequisite for reliability - Edsger W. Dijkstra