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-14299] swift demangle stuck with no feedback given incorrect input #56658

Closed
LucianoPAlmeida opened this issue Mar 4, 2021 · 3 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@LucianoPAlmeida
Copy link
Collaborator

Previous ID SR-14299
Radar None
Original Reporter @LucianoPAlmeida
Type Bug
Status Closed
Resolution Invalid
Environment

Xcode 12.4

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

md5: 2d6e8f31767578e88d997fe63c5200fa

Issue Description:

Trying to use swift-demangle with the $ before the mangled name

swift demangle $ss30_copySequenceToContiguousArrayys0dE0Vy7ElementQzGxSTRzlFs07LazyMapB0VySaySiGSiG_Tg5

And it simply got stuck without any message or execute anything.
Using it like bellow it works as expected

swift demangle ss30_copySequenceToContiguousArrayys0dE0Vy7ElementQzGxSTRzlFs07LazyMapB0VySaySiGSiG_Tg5
$ss30_copySequenceToContiguousArrayys0dE0Vy7ElementQzGxSTRzlFs07LazyMapB0VySaySiGSiG_Tg5 ---> generic specialization <Swift.LazyMapSequence<[Swift.Int], Swift.Int>> of Swift._copySequenceToContiguousArray<A where A: Swift.Sequence>(A) -> Swift.ContiguousArray<A.Element>

So I wonder if this is a bug or what should happen in that case? I would expect an error message or even better if it just works ignoring the initial $.

Let me know if this makes sense or am I missing something =]

@LucianoPAlmeida
Copy link
Collaborator Author

cc theindigamer (JIRA User)

@typesanitizer
Copy link

It depends on what shell you're using. The string needs to be quoted; otherwise if it expands to empty, swift demangle will try to read from stdin.

@LucianoPAlmeida
Copy link
Collaborator Author

Ah ok sorry, my mistake. Thank you for the clarification =]

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants