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-15417] __darwin_va_list not compatible with CVaListPointer on macOS arm64 #57731

Open
swift-ci opened this issue Nov 1, 2021 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Nov 1, 2021

Previous ID SR-15417
Radar None
Original Reporter Davidee (JIRA User)
Type Bug
Environment

darwin arm64

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: a4f090aa2089ad3cd8550996357ee5f1

Issue Description:

The following code compiles + works on macOS x86_64 but not arm64:

import Foundation

let msg = "Hello Syslog from Swift"
msg.withCString { cStr in
    withVaList([cStr]) { vaList in
        vsyslog(0, "%s", vaList)
    }
}

The error on macOS arm64:

Cannot convert value of type 'CVaListPointer' to expected argument type '__darwin_va_list?' (aka 'Optional<UnsafeMutablePointer<Int8>>')

Not exactly sure why this happens, it seems like both of these two code paths (here and here) might need to be updated to support __darwin_va_list on darwin arm64.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

1 participant