Skip to content

Commit 67aee7b

Browse files
committed
override empty function name behavior from SentryStackTraceFactory.isInApp() because it applies to class-names generically whereas we use it only for function name prefixes.
1 parent 017ac5f commit 67aee7b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sentry-android-core/src/main/java/io/sentry/android/core/internal/tombstone/TombstoneParser.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,14 @@ private SentryStackTrace createStackTrace(@NonNull final TombstoneProtos.Thread
125125
// inAppIncludes/inAppExcludes filter by Java/Kotlin package names, which don't overlap
126126
// with native C/C++ function names (e.g., "crash", "__libc_init"). For native frames,
127127
// isInApp() returns null, making nativeLibraryDir the effective in-app check.
128+
// Protobuf returns "" for unset function names, which would incorrectly return true
129+
// from isInApp(), so we treat empty as false to let nativeLibraryDir decide.
130+
final String functionName = frame.getFunctionName();
128131
@Nullable
129132
Boolean inApp =
130-
SentryStackTraceFactory.isInApp(frame.getFunctionName(), inAppIncludes, inAppExcludes);
133+
functionName.isEmpty()
134+
? Boolean.FALSE
135+
: SentryStackTraceFactory.isInApp(functionName, inAppIncludes, inAppExcludes);
131136

132137
final boolean isInNativeLibraryDir =
133138
nativeLibraryDir != null && frame.getFileName().startsWith(nativeLibraryDir);

0 commit comments

Comments
 (0)