symbolic icon indicating copy to clipboard operation
symbolic copied to clipboard

Missing mangling in stack trace

Open sindresorhus opened this issue 1 year ago • 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

sindresorhus avatar Oct 17 '24 10:10 sindresorhus

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.

philipphofmann avatar Oct 17 '24 11:10 philipphofmann

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

getsantry[bot] avatar Oct 17 '24 11:10 getsantry[bot]

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

getsantry[bot] avatar Oct 17 '24 11:10 getsantry[bot]

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

getsantry[bot] avatar Oct 21 '24 07:10 getsantry[bot]

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.

loewenheim avatar Oct 22 '24 10:10 loewenheim

Fixed with #885, may take a few days until this is out in Sentry SaaS.

Dav1dde avatar Jan 09 '25 11:01 Dav1dde