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
SwiftSyntax 0.50100.0, Xcode 11.1. Made a simple SwiftPM project, used generate-xcodeproj to make a project to open (double-clicking the Package.swift file did not produce a buildable project).
Additional Detail from JIRA
Votes
0
Component/s
SwiftSyntax
Labels
Bug
Assignee
None
Priority
Medium
md5: 9e3f668e7cbc4a6d8fd8813e5c6f08ad
Issue Description:
I'm trying to create and use a SyntaxRewriter subclass from a thread other than main. I'm not sharing between threads, so it seems like it should be fine. However, I get an EXEC_BAD_ACCESS inside of SwiftSyntax. Here's some sample code that demonstrates the problem, which is adapted from the SwiftSyntax README's sample code:
letstring = """protocol P { var x: Int? { get set }}"""letqueue = DispatchQueue.global()
letsourceFile = try! SyntaxParser.parse(source: string)
letsemaphore = DispatchSemaphore(value: 0)
queue.async {
_ = Renamer().visit(sourceFile)
semaphore.signal()
}
semaphore.wait()
print("done")
It crashes with an EXEC_BAD_ACCESS, typically in `SyntaxRewriter.visitChildren()`. Trying to print any variables in the debugger outputs "Trying to put the stack in unreadable memory at <some memory address>".
I can't reproduce this in an optimized build.
The text was updated successfully, but these errors were encountered:
Environment
SwiftSyntax 0.50100.0, Xcode 11.1. Made a simple SwiftPM project, used generate-xcodeproj to make a project to open (double-clicking the Package.swift file did not produce a buildable project).
Additional Detail from JIRA
md5: 9e3f668e7cbc4a6d8fd8813e5c6f08ad
Issue Description:
I'm trying to create and use a SyntaxRewriter subclass from a thread other than main. I'm not sharing between threads, so it seems like it should be fine. However, I get an EXEC_BAD_ACCESS inside of SwiftSyntax. Here's some sample code that demonstrates the problem, which is adapted from the SwiftSyntax README's sample code:
It crashes with an EXEC_BAD_ACCESS, typically in `SyntaxRewriter.visitChildren()`. Trying to print any variables in the debugger outputs "Trying to put the stack in unreadable memory at <some memory address>".
I can't reproduce this in an optimized build.
The text was updated successfully, but these errors were encountered: