Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.502.1" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2026.502.3" />
<!-- `ppy.osu.Framework.NativeLibs` is a transitive dependency of `ppy.osu.Framework`
that ships desktop-only natives (Linux/macOS/Windows) under `runtimes/<rid>/native/`
— including a bare Linux `libbass.so`/`libbass_fx.so`/`libbassmix.so` for linux-arm64.
Expand Down
30 changes: 30 additions & 0 deletions osu.Android/Native/crash_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ volatile sig_atomic_t g_installed = 0;
// the previous handler instead of recursing.
volatile sig_atomic_t g_inHandler = 0;

// Permanent "dump written" latch. Set to 1 the first time we successfully
// begin writing a dump; never reset. Prevents a second full dump being
// written if the crash handler is somehow re-invoked in the same process
// lifetime (e.g. Mono re-raises SIGSEGV via tgkill after our handler chains
// to it, and our handler gets re-installed between the two deliveries).
// Unlike g_inHandler this is intentionally NOT cleared before the re-raise.
volatile sig_atomic_t g_dumpWritten = 0;

// ----------------------------------------------------------------------------
// Async-signal-safe formatters (no malloc, no stdio, no locale).
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -983,6 +991,28 @@ static void crashHandler(int sig, siginfo_t* info, void* ucontext) {
}
g_inHandler = 1;

// Duplicate-dump guard. If we already wrote a dump for this process
// lifetime (e.g. the handler was re-invoked after Mono re-raised the
// signal), skip the dump but still chain to the previous handler so the
// system tombstone is produced. Unlike g_inHandler this latch is never
// cleared — one dump per crash, not one dump per signal delivery.
if (g_dumpWritten) {
bool restored = false;
for (size_t i = 0; i < kNumSignals; ++i) {
if (kSignals[i] == sig) {
restored = (sigaction(sig, &g_prevHandlers[i], nullptr) == 0);
break;
}
}
// If sigaction failed we cannot chain cleanly — fall back to default
// disposition so the process at least terminates and debuggerd runs.
if (!restored) signal(sig, SIG_DFL);
g_inHandler = 0;
raise(sig);
return;
}
g_dumpWritten = 1;

// Open the dump file (append). If g_logPath is empty we still log to logcat.
//
// Pre-rotate runaway: if the existing log is more than 4× the soft cap
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/osu.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="20.1.0" />
<PackageReference Include="ppy.osu.Framework" Version="2026.502.1" />
<PackageReference Include="ppy.osu.Framework" Version="2026.502.3" />
<!--
Explicitly pin `ppy.Veldrid.SPIRV` to the winnerspiros fork build that
`ppy.osu.Framework 2026.502.1` was compiled against. This version is the only
`ppy.osu.Framework 2026.502.3` was compiled against. This version is the only
one whose `runtimes/android-arm64/native/libveldrid-spirv.so` is aligned to 16 KB
pages (required by Android 16+). It lives only as a release asset on
<https://github.com/winnerspiros/veldrid-spirv/releases/tag/1.0> and is vendored
Expand Down
2 changes: 1 addition & 1 deletion osu.iOS.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.502.1" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2026.502.3" />
</ItemGroup>
</Project>
Loading