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
Compiling with -enable-spec-devirt makes tests stable again.
Stack traces are different for different call sites. Mostly "Illegal Instruction" somewhere in Foundation.dll. Common in all cases: always related to bridged classes. In case below it is _NSCFConstantString.
The easiest steps I found (and most informative at the same time):
Replace content of TestFoundation\main.swift with sample code:
import Foundation
_ =Bundle.main.infoDictionary // <- crash
2. Build and run TestFoundation target
Reconstructed stack:
swiftCore.dll swift::TargetOpaqueExistentialContainer<swift::InProcess>::projectValue Line 31 swift\stdlib\public\runtime\ExistentialContainer.cpp(31)
swiftCore.dll swift::TargetExistentialTypeMetadata<swift::InProcess>::projectValue Line 1858 swift\include\swift\ABI\Metadata.h(1858)
swiftCore.dll tryDynamicCastBoxedSwiftValue Line 1904 swift\stdlib\public\runtime\Casting.cpp(1904)
swiftCore.dll swift_dynamicCastImpl Line 2265 swift\stdlib\public\runtime\Casting.cpp(2265)
...
Foundation.dll Dictionary._conditionallyBridgeFromObjectiveC(_:result:) Line 70 Foundation\Dictionary.swift(70) // "guard let k = key as? Key", key is _NSCFConstantString
Foundation.dll Dictionary._unconditionallyBridgeFromObjectiveC(_:) Line 91 Foundation\Dictionary.swift(91)
Foundation.dll NSDictionary._bridgeToSwift() Line 731 Foundation\NSDictionary.swift(731)
Foundation.dll _StructTypeBridgeable._bridgeToAny() Line 50 Foundation\Bridging.swift(50)
Foundation.dll __SwiftValue.fetch(nonOptional:) Line 164 Foundation\Bridging.swift(164)
Foundation.dll __SwiftValue.fetch(_:) Line 82 Foundation\Bridging.swift(82)
Foundation.dll Bundle.infoDictionary Line 366 Foundation\Bundle.swift(366)
...
The text was updated successfully, but these errors were encountered:
This was the compiler optimizing away the initializer (reasonably). This has been resolved for now (added a {{@inline(never)}} function call with the result).
Attachment: Download
Environment
Apple Swift version 5.2-dev (LLVM 88d1013b2e, Swift 7177f4a730)
Target: x86_64-unknown-windows-msvc
Additional Detail from JIRA
md5: bc89c69d3a5f5a94258b547fe2202d02
Issue Description:
After commit 5285bf7200d2999812a79df35ff2eebd41cc7ee7 noticeable part of Foundation tests on Windows became unstable.
Compiling with
-enable-spec-devirt
makes tests stable again.Stack traces are different for different call sites. Mostly "Illegal Instruction" somewhere in
Foundation.dll
. Common in all cases: always related to bridged classes. In case below it is_NSCFConstantString
.The easiest steps I found (and most informative at the same time):
TestFoundation\main.swift
with sample code:2. Build and run
TestFoundation
targetReconstructed stack:
The text was updated successfully, but these errors were encountered: