Skip to content

Add an unwind crashtest kind that panics straight in plex_run - #171

Merged
GLinnik21 merged 1 commit into
mainfrom
feat/crashtest-unwind
Sep 19, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
feat/crashtest-unwind

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Summary

  • Adds plxnative-crashtest=unwind, a new crash_on_purpose() kind (rust-modules/src/dev.rs) that panics directly inside crash_on_purpose itself, rather than inside an extern "C" callback like panic does — so the unwind crosses plex_run's own frame before aborting at its extern "C" boundary.
  • This exercises the path fixed in PR Crash reporting: keep capture armed through a panic, retry unreadable envelopes, read nothing without a DSN #168 (d7f35ac): Drop for Guard (rust-modules/src/telemetry/native.rs) now returns early when std::thread::panicking(), so the native telemetry backend stays armed through the unwind and the boundary abort should still produce a native SIGABRT envelope, instead of silently dropping it as it did before that fix.
  • Updates the crash_on_purpose doc comment to list unwind alongside the existing kinds and to describe both non-signal kinds accurately (panic = callback shape like ff::read_cb; unwind = a panic escaping plex_run, the Guard regression path).
  • Updates the kinds list in docs/agent-reference.md, which was already stale (missing panic), to match the full, current list including unwind.

Test plan

  • make check (host unit suite + lint) — passing
  • CARGO_INCREMENTAL=0 cargo +nightly check --manifest-path rust-modules/Cargo.toml --lib --no-default-features — passing
  • make (ARM cross-build) — passing
  • On-device verification: plxnative-crashtest=unwind should be exercised on the TV to confirm the native SIGABRT envelope is produced (not run here; this PR only adds the trigger and updates docs)

🤖 Generated with Claude Code

PR #168 made the telemetry `Guard`'s Drop check `std::thread::panicking()`
and return early, so a panic unwinding out of `plex_run` no longer tears
the native crash backend down before the boundary abort. `panic` still
exercises the extern "C" callback shape; `unwind` is the regression test
for the Guard fix itself, panicking directly in `crash_on_purpose` so the
unwind crosses `plex_run`'s own frame before aborting at its extern "C"
boundary.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 19, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@GLinnik21
GLinnik21 merged commit b255985 into main Sep 19, 2026
5 checks passed
@GLinnik21
GLinnik21 deleted the feat/crashtest-unwind branch September 19, 2026 20:26
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