From 324bb3996ab7759e7927e44b314c30bd9dbac6b5 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Thu, 17 Jul 2025 14:45:35 +0200 Subject: [PATCH 1/2] feat(proguard): Mark synthesized methods on frames Depends on https://github.com/getsentry/symbolicator/pull/1734. This adds a field `method_synthesized` to `JvmFrame` that denotes whether the frame's method was synthesized by the compiler. --- crates/symbolicator-proguard/src/interface.rs | 8 ++++++++ crates/symbolicator-proguard/src/symbolication.rs | 2 ++ ...ntegration__proguard__source_lookup_with_proguard.snap | 1 + 3 files changed, 11 insertions(+) diff --git a/crates/symbolicator-proguard/src/interface.rs b/crates/symbolicator-proguard/src/interface.rs index 6f35a3595..9d5f5cd65 100644 --- a/crates/symbolicator-proguard/src/interface.rs +++ b/crates/symbolicator-proguard/src/interface.rs @@ -103,6 +103,14 @@ pub struct JvmFrame { /// instead of using line numbers. #[serde(skip_serializing_if = "Option::is_none")] pub signature: Option, + + /// Whether this frame's method was synthesized by the compiler. + #[serde(default, skip_serializing_if = "is_false")] + pub method_synthesized: bool, +} + +fn is_false(b: &bool) -> bool { + !*b } /// An exception in a JVM event. diff --git a/crates/symbolicator-proguard/src/symbolication.rs b/crates/symbolicator-proguard/src/symbolication.rs index e5c7129bd..967d9f7ed 100644 --- a/crates/symbolicator-proguard/src/symbolication.rs +++ b/crates/symbolicator-proguard/src/symbolication.rs @@ -373,6 +373,7 @@ impl ProguardService { .file() .map(String::from) .or_else(|| original_frame.filename.clone()), + method_synthesized: new_frame.method_synthesized(), ..original_frame.clone() }; @@ -877,6 +878,7 @@ y.b -> y.b: abs_path: Some("CustomThreadFactory".into()), filename: Some("CustomThreadFactory".into()), index: 0, + method_synthesized: true, ..Default::default() } ); diff --git a/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap b/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap index fe3a27bfc..f41bfb680 100644 --- a/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap +++ b/crates/symbolicator-proguard/tests/integration/snapshots/integration__proguard__source_lookup_with_proguard.snap @@ -102,6 +102,7 @@ stacktraces: lineno: 0 in_app: true index: 18 + method_synthesized: true - function: onCreate$lambda-1 module: io.sentry.samples.instrumentation.ui.EditActivity lineno: 37 From beca4ea1d18a99831625c2b1f68f93d32daa2139 Mon Sep 17 00:00:00 2001 From: Sebastian Zivota Date: Thu, 17 Jul 2025 14:53:33 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f81daf070..d8141a127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ - Bump `proguard` from v5.5.0 to v5.6.1 This also bumps the proguard cache version from v3 to v4. ([#1734](https://github.com/getsentry/symbolicator/pull/1734)) +### Various fixes & improvements + +- Symbolicated JVM frames are now marked according to whether their method was + synthesized by the compiler. ([#1735](https://github.com/getsentry/symbolicator/pull/1735)) + ## 25.7.0 ### Various fixes & improvements