getsentry/symbolic

Missing mangling in stack trace

Opened this issue · 5 comments

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_qd__mtSo7AXErrorVYKAcDRd__lFAC3AppC_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

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

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

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

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

Indeed, the current swift demangler in symbolic cannot demangle this symbol. It's possible that #854 would help, but that has stalled.