Skip to content

fix: disable signal-safe stderr logging on PlayStation - #2133

Merged
tustanivsky merged 2 commits into
masterfrom
fix/ps-signal-safe-log
Sep 23, 2026
Merged

tustanivsky merged 2 commits into
masterfrom
fix/ps-signal-safe-log

Conversation

@tustanivsky

Copy link
Copy Markdown
Collaborator

SENTRY_SIGNAL_SAFE_LOG writes to stderr with write(). On PlayStation, doing that from the coredump handler crashes the handler (Debug handler crashed … 0xa002030a). When that happens, the crash dump is uploaded without Sentry's userdata, so the event has no SDK context: no release, tags, breadcrumbs or attachments.

This became visible in 0.17.0. #2112 added sentry__invoke_on_crash, which logs before calling the hook, and the PlayStation backend now calls it from the coredump handler. Any app with an on_crash callback, including every Unreal Engine game, loses its crash context.

This PR makes the macro a no-op on SENTRY_PLATFORM_PS, the same way it already is on other platforms that are neither Unix nor Windows. The PlayStation backend already turns off regular logging inside the handler for the same reason.

Verified on a PS5 devkit with sentry-playstation's integration tests, using an app that registers on_crash: crash-capture fails on 0.17.0 and passes with this change.

@tustanivsky
tustanivsky marked this pull request as ready for review September 23, 2026 13:37
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.44%. Comparing base (b01cd40) to head (02f8290).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2133   +/-   ##
=======================================
  Coverage   75.44%   75.44%           
=======================================
  Files         103      103           
  Lines       28026    28026           
  Branches     5114     5114           
=======================================
+ Hits        21143    21145    +2     
+ Misses       5549     5547    -2     
  Partials     1334     1334           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tustanivsky
tustanivsky merged commit 4b66ef5 into master Sep 23, 2026
72 checks passed
@tustanivsky
tustanivsky deleted the fix/ps-signal-safe-log branch September 23, 2026 14:31
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