Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12301] Bundle.main crashes on Windows in Foundation.Bundle._supportsFreestandingBundles.getter : Swift.Bool #3266

Closed
troughton opened this issue Mar 1, 2020 · 2 comments

Comments

@troughton
Copy link
Contributor

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 #&#8203;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

@hborla
Copy link
Member

hborla commented Mar 3, 2020

@swift-ci create

@compnerd
Copy link
Collaborator

compnerd commented Mar 4, 2020

Fixed in git 33150e32b4f5c5f9ecae234b3c3d8251877de402

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants