What's Changed
Headline: crash and hang stabilization release. Closes #128, #137, #141, #142, #143.
Crash + hang fixes
Heap-reuse / stale-pointer family (#128, #141, #142, #143)
- PR #133 — four-lead heap-reuse fix (libultraship sPortPackedDisplayListCache per-load eviction;
Interpreter::SpReset per-frame segment-table clear; 1P-mode CSS slot clears; sc1pmanager per-iteration
fighter_gobj scrub). - PR #144 — fifth lead and 13 additional ASan-found fixes:
- ftmanager: route N-Kirby FTKirbyCopy lookup through gFTDataNKirbySubMotion (the only true
heap-use-after-free in this batch — original code held a stale pointer to a freed prior arena when N-Kirby
spawned without real Kirby, e.g. Race to the Finish randomly picking N-Kirby as one of three polygons). - Implicit fall-through array terminators (4): Link Claps2 + Pikachu Win2 motion scripts, Fox + Pikachu
SpecialHi col scripts. Two had author-acknowledgement comments admitting the original ROM relied on
adjacent-BSS layout. - Sentinel-value-indexed table bounds (3): efmanager damage-light per-player table (clamp on
attacker_player==4 boss/no-attacker case), mnPlayersVS portrait fkind (clamp on nFTKindNull=28/Boss/polygon
kinds), ftbosswait Master-Hand status_id (clamp on -1 sentinel). - Counter underflow guard (1): mnPlayersVSUpdateCursorPlacementPriorities unheld_id clamp after each
decrement. - Missing-prerequisite guards (3): mnPlayersVSUpdateControllerOrders ARRAY_COUNT guard (the original code
had a // AND DOES!!! comment), sc1PGameAppendBonusStats NBumper-branch PlayerKOsNum!=0 guard, Kirby
team-order index range check.
- ftmanager: route N-Kirby FTKirbyCopy lookup through gFTDataNKirbySubMotion (the only true
SDL3 udev hang fix (#137)
- libultraship: disable SDL3 HIDAPI joystick backend on Linux (falls back to evdev / inotify — no
synchronous udev_device_get_sysattr_value from SDL_PumpEvents on the main thread) + release the hidapi udev
monitor in RaphnetPhysicalDeviceManager::Init when no Raphnet adapter is present. Two independent udev
monitors on the same netlink socket were doubling the chance of a 3–5s blocking sysfs read freezing the
frame loop.
Diagnostic instrumentation (no runtime cost)
- libultraship: 32-slot ring buffers tracking segment-table writes + display-list pushes, with a pre-deref
__asan_region_is_poisoned check that dumps state before ASan halts. Entirely gated behind
PORT_DIAG_HAVE_ASAN — non-ASan release builds compile this to zero bytes.
Decomp upstream sync + port fixes
- Restore upstream's full motion-DSL macros (removes over-eager #ifndef PORT around aobj macros).
- Annotate 616 missing extern dep_file_ids across 11 NXxxModel files.
- Re-add upstream's annotateExternRelocFids.py + vpk0_excess_bytes.txt.
- Fix Samus charge whoosh persisting after pause on PORT.
- MSVC build fixes (stdarg.h va_list, mnmaps.c #-in-macro-arg).
Build / tooling
- Source-compile relocData via the Battle-ShipYard modkit (PR #139) — 1870/1870 equivalent on clang + MSVC.
Foundational change that lets the previously-binary reloc resources be edited as C source. (Indirectly
amplified the visibility of all the Class A "implicit fall-through array" bugs above, since source-compiled
globals get ASan redzones between them where the original BSS layout was contiguous.) - CMake: fix torch.exe post-build path for single-config generators (PR #138).
- tools/generate_reloc_stubs.py: skip the 337 KB reloc_data.h write when content is unchanged (avoids
PermissionError from concurrent readers — Defender, editor, parallel worktree). - HTTPS for decomp submodule URL.
Submodule pointer changes
decomp fa0f34eb → b47c28b5 (17 commits)
libultraship a8a6ea97 → a5408346 (4 commits)
Full Changelog: v0.7.5-beta...v0.7.6-beta