Cannot demangle Swift symbols

Originator:hesham.abdelmegid
Number:rdar://39441521 Date Originated:15-Apr-2018 12:00 AM
Status:Closed Resolved:
Product:Developer Tools Product Version:Swift 2.2.1 to 4.1
Classification:Serious Bug Reproducible:Yes
 
Summary:

I'm trying to de-mangle mangled Swift symbols with swift-demangle. Some symbols are de-mangled just fine, but some others can't be de-mangled at all no matter what version of Swift I'm using. 

Steps to Reproduce:

Run swift-damangle with the following command:

swift-demangle -compact -no-sugar -simplified _TTSf4g_n_n_n___TTOFE5UIKitCSo18NSAttributedStringcfzT4dataV10Foundation4Data7optionsGVs10DictionarySSP__18documentAttributesGSqGVs33AutoreleasingUnsafeMutablePointerGSqCSo12NSDictionary____S0_

Expected Results:

swift-demangle should return demangled symbol.

Actual Results:

swift-demangle returns the same mangled symbol.

Version/Build:

Tried on Swift versions: 2.2.1, 3.0.1, 3.0.2, 3.1, 3.1.1, 4.0.2, 4.0.3 and 4.1,

Configuration:

swift-demangle on the Swift version mentioned above, running on macOS High Sierra.

Comments

Engineering has provided the following feedback regarding this issue:

It’s not clear where that symbol came from, but judging from the symbol prefix, it must be from an old version of Swift. Until Swift has a stable ABI, we don’t promise to be able to demangle symbols from older versions of Swift.

We consider this issue closed. If you have any questions or concern regarding this issue, please update your report directly (https://bugreport.apple.com).

Thank you for taking the time to notify us of this issue.

Best Regards,

Developer Bug Reporting Team Apple Worldwide Developer Relations

By hesham.abdelmegid at April 24, 2018, 9 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!