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-12053] Fullpath encoded in binary when using -enable-experimental-concise-pound-file #54489

Closed
johnno1962 opened this issue Jan 19, 2020 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@johnno1962
Copy link
Contributor

Previous ID SR-12053
Radar rdar://problem/58485813
Original Reporter @johnno1962
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 399e2f9d9e2a7307dd00708200ef5757

Issue Description:

Hi Apple,

There seems to be a minor oversight in the current implementation of SE-0274 — Concise Magic File Names. It is still possible to have the user's full path encoded in application binaries if they use the force operator '!' as the path is included in the diagnostic message. For example, force unwraps or force casts:
```
var a: String?
print(a as! String)
fatalError("Eh?")
```
```
$ strings b
/tmp/a.swift
Unexpectedly found nil while unwrapping an Optional value
Fatal error
a.swift (b)
_TtCs12_SwiftObject
__TEXT
swift_getObjCClassMetadata
__swift5_proto
```
Implicit capture of #file in functions such as fatalError seems to be fine.

@theblixguy
Copy link
Collaborator

This has already been fixed: #29135

@johnno1962
Copy link
Contributor Author

Excellent thanks!

@johnno1962
Copy link
Contributor Author

Already fixed

@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