Description
Previous ID | SR-12301 |
Radar | rdar://problem/59976656 |
Original Reporter | @troughton |
Type | Bug |
Status | Closed |
Resolution | Done |
Additional Detail from JIRA
Votes | 0 |
Component/s | Foundation |
Labels | Bug, Windows |
Assignee | @compnerd |
Priority | Medium |
md5: c7599d15c7017be30d4adfbcc8d45ce5
Issue Description:
The test case
import Foundation
let _ = Bundle.main
compiled with a compnerd.org Swift toolchain using "swiftc -emit-executable -o main.exe main.swift" crashes with the log:
* thread #​1, stop reason = Exception 0xc000001d encountered at address 0x7fff5316968d
{{ frame #0: 0x00007fff5316968d Foundation.dll`static Foundation.Bundle._supportsFreestandingBundles.getter : Swift.Bool + 141}}
Foundation.dll`static Foundation.Bundle._supportsFreestandingBundles.getter : Swift.Bool:
-> 0x7fff5316968d <+141>: ud2
{{ 0x7fff5316968f <+143>: nop}}Foundation.dll`Foundation.Bundle.__allocating_init(cfBundle: __C.CFBundleRef) -> Foundation.Bundle:
{{ 0x7fff53169690 <+0>: pushq %rbp}}
{{ 0x7fff53169691 <+1>: pushq %rsi}}
and backtrace
* thread #​1, stop reason = Exception 0xc000001d encountered at address 0x7fff5316968d
{{ * frame #0: 0x00007fff5316968d Foundation.dll`static Foundation.Bundle._supportsFreestandingBundles.getter : Swift.Bool + 141}}
{{ frame #1: 0x00007fff53aba21e swiftCore.dll`swift_once + 158}}
{{ frame #2: 0x00007fffd184b05f ntdll.dll`RtlRunOnceExecuteOnce + 143}}
{{ frame #3: 0x00007fffcf5620ab KernelBase.dll`InitOnceExecuteOnce + 11}}
{{ frame #4: 0x00007fffb53a522b msvcp140.dll`__crtInitOnceExecuteOnce + 59}}
{{ frame #5: 0x00007fff53aba1c3 swiftCore.dll`swift_once + 67}}
{{ frame #6: 0x00007fff5316970e Foundation.dll`static Foundation.Bundle.main.getter : Foundation.Bundle + 30}}
{{ frame #7: 0x00007ff6f58f11ea main.exe`main + 58}}
{{ frame #8: 0x00007ff6f58f14b0 main.exe`main + 768}}
{{ frame #9: 0x00007fffd12d7bd4 kernel32.dll`BaseThreadInitThunk + 20}}
{{ frame #10: 0x00007fffd18aced1 ntdll.dll`RtlUserThreadStart + 33}}
cc @compnerd