getsentry / symbolic

Stack trace symbolication library written in Rust
https://github.com/getsentry/symbolic#readme
MIT License
451 stars 76 forks source link

Missing mangling in stack trace #873

Open sindresorhus opened 2 weeks ago

sindresorhus commented 2 weeks ago

Platform

macOS

Environment

Production

Installed

Swift Package Manager

Version

8.38.0

Xcode Version

16.0

Did it work on previous versions?

No response

Steps to Reproduce

One stack frame is not demangled:

$s11Supercharge2AXO7ElementPAAE8elements33_35EDDAA799FBB5B74D2F426690B0D99DLL3for2asSayqd__GSo28NSAccessibilityAttributeNamea_qdmtSo7AXErrorVYKAcDRdlFAC3AppC_AC6WindowCTgm5

The stack trace line number referes to try value(for: attribute, as: [AXUIElement].self)?.map { T($0) } ?? [] in

enum AX {}

extension AX {
    protocol Element {}
}

extension AXError: @retroactive Error {}

extension AX.Element {
    fileprivate func elements<T: AX.Element>(
        for attribute: NSAccessibility.Attribute,
        as type: T.Type
    ) throws(AXError) -> [T] {
        try value(for: attribute, as: [AXUIElement].self)?.map { T($0) } ?? []
    }
}

So it could be missing handling of mangling for nested protocols or typed throws.

Expected Result

I expected the stack frames be properly demangled.

Actual Result

Stack trace: https://sindresorhus.sentry.io/share/issue/784ced2af05b481d864831afb7c66548/

Are you willing to submit a PR?

No response

philipphofmann commented 2 weeks ago

This looks more like a problem with symbolication. I'm going to transfer this issue to the main repo. This could be related to https://github.com/getsentry/sentry/issues/79268.

getsantry[bot] commented 2 weeks ago

Auto-routing to @getsentry/product-owners-issues for triage ⏲️

getsantry[bot] commented 2 weeks ago

Routing to @getsentry/product-owners-issues-source-maps for triage ⏲️

getsantry[bot] commented 1 week ago

Routing to @getsentry/product-owners-processing for triage ⏲️

loewenheim commented 1 week ago

Indeed, the current swift demangler in symbolic cannot demangle this symbol. It's possible that https://github.com/getsentry/symbolic/pull/854 would help, but that has stalled.