Skip to content

Fix crash when parsing native stack frames without symbols#278

Open
BartoszLitwiniuk wants to merge 24 commits intomasterfrom
bugfix/native_stack_frames_fix
Open

Fix crash when parsing native stack frames without symbols#278
BartoszLitwiniuk wants to merge 24 commits intomasterfrom
bugfix/native_stack_frames_fix

Conversation

@BartoszLitwiniuk
Copy link
Copy Markdown
Contributor

@BartoszLitwiniuk BartoszLitwiniuk commented Mar 5, 2026

Summary

Fixes a crash in the native stack trace parser when frames are missing symbol information. Refactors BacktraceRawStackTraceParser for safer parsing and adds unit test coverage.

It's a follow up of changes made in #258 and bug BT-5953.

Changes

  • Added bounds checks in SetNativeStackTraceInformation to prevent out-of-range access when a native frame lacks symbol data
  • Extract parsing logic to BacktraceRawStackTraceParser for clearer, more defensive frame parsing
  • Added debug logging to aid future diagnosis of malformed frames
  • Added BacktraceRawStackTraceParserTests covering native frame parsing edge cases
  • Use BacktraceRawStackTraceParser in BacktraceUnhandledException instead of mixing unhandled exception handler with parsing logic

Testing

  • New unit tests validate safe parsing of native frames, including frames without symbols
  • Existing tests continue to pass

@BartoszLitwiniuk BartoszLitwiniuk changed the title Bugfix/native stack frames fix Draft: Bugfix/native stack frames fix Mar 5, 2026
@BartoszLitwiniuk BartoszLitwiniuk marked this pull request as draft March 5, 2026 21:04
@BartoszLitwiniuk BartoszLitwiniuk changed the base branch from bugfix/native_stack_frames to master April 11, 2026 07:07
@BartoszLitwiniuk BartoszLitwiniuk marked this pull request as ready for review April 15, 2026 10:37
@BartoszLitwiniuk BartoszLitwiniuk marked this pull request as draft April 15, 2026 10:57
@BartoszLitwiniuk BartoszLitwiniuk marked this pull request as ready for review April 21, 2026 18:02
Bartosz Litwiniuk added 3 commits April 21, 2026 20:09
…ve_stack_frames_fix

# Conflicts:
#	Runtime/Model/BacktraceRawStackTraceParser.cs
@BartoszLitwiniuk BartoszLitwiniuk changed the title Draft: Bugfix/native stack frames fix Fix crash when parsing native stack frames without symbols Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants