Windows: Spirit of the Island (PPSA13934) crashes in its heap allocator during the new-save load; Goat Simulator 3 shows the same class #15350

Open
opened 2026-11-03 02:25:05 +00:00 by JJenkx · 0 comments
JJenkx commented 2026-11-03 02:25:05 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-11-03T02:25:05Z.


What happens

Spirit of the Island crashes in its own heap allocator in about half of the runs, during the load after a new game is confirmed (about 217 s in): FATAL: unhandled exception 0xc0000005 ... app.exe+0x166cfbf. A heap chunk's size field holds the chunk's own address with the low bit set.

Title, test or build step

PPSA13934 (Spirit of the Island) 01.000.000, Unity with IL2CPP. Bring-up thread: #15337.

AnyPS5 commit

Libraries from main 7feb37ee3e, Release, with no local changes. The executable was converted on 2026-10-20 by that day's relinker.

System

Windows 11 Enterprise 10.0.22621, AMD Ryzen 9 5950X (32 threads, 64 GiB), Radeon RX 6700 XT with the AMD proprietary driver 26.10.1, MinGW-w64 GCC 15.2.0 UCRT.

Host report

No ANYPS5_HOST_REPORT=1 block was captured. The same facts come from the aps5-summary.jsonl of a traced run on these libraries: commit 7feb37ee3e30, not dirty, AMD Radeon RX 6700 XT, AMD proprietary driver 26.10.1 (AMD proprietary shader compiler), Windows 10.0.22621, AMD Ryzen 9 5950X 16-Core Processor, 32 threads, 65457 MiB, 1920x1080.

Steps to reproduce

The title is started with scripted input through APS5_PAD_INPUT_FILE (tools/pad_input.py), with text posted to the window for the name fields:

  • Title: cross at 90 s on the title screen.
  • New game: a name and a property name typed through the IME, then R1 ×5 through the character tabs and Options at 210 s to confirm.

The new save then loads the island. The crash comes 6 to 7 s after the confirmation (216.8 s and 216.9 s), or later during the first minute on the island. In 9 runs on the libraries above, 4 crashed:

Mode Runs Crashed
default 4 2
APS5_EAGER_WRITEBACK=1 1 1
APS5_GPU_NO_WRITEBACK=1 4 1

The other runs reached island gameplay and ran to their 330 s limit.

Log

The two crashes at the same site (default mode, then APS5_GPU_NO_WRITEBACK=1):

FATAL: unhandled exception 0xc0000005 on thread 218992 ''
  rip 0x000000014166cfbf app.exe+0x166cfbf
  read of 0x000000044b4fff50
  rax 0000000225a7ffa0 rbx 0000000225a7ffa0 rcx 0000000225a7ffa1 rdx 0000000225a7ff98
  rsi 0000000225a7ffa0 rdi 0000000200044500 rbp 000000000060b1c0 rsp 000000000060b1a8
  [rax] 0000000000000000 0000000225a7ffa1 0000000000000002 0000000000000000 ...

FATAL: unhandled exception 0xc0000005 on thread 193524 ''
  rip 0x000000014166cfbf app.exe+0x166cfbf
  read of 0x000000044b5ffdd0
  rax 0000000225affee0 rbx 0000000225affee0 rcx 0000000225affee1 rdx 0000000225affed8

The code at the fault walks heap chunks:

14166cfb0  mov 0x8(%rsi),%rdx          ; chunk size field
14166cfb7  add $0xfffffffffffffff8,%rdx
14166cfbb  and $0xfffffffffffffffc,%rdx
14166cfbf  mov 0x18(%rsi,%rdx,1),%rcx   ; next chunk's header: faults

In both crashes the size field [chunk+8] is the chunk's own address with bit 0 set (0x225a7ffa1 at 0x225a7ffa0, 0x225affee1 at 0x225affee0), so the walk jumps to about twice the address. The other two crashes are elsewhere in the same title:

  • Loading.PreloadManager: a write to 0x18 at app.exe+0x166cb3c, in the same allocator code.
  • Low-stack thread: a read of 0x18 at app.exe+0xa7072e.

What was checked

All on the libraries above, on Windows:

  • Not GPU write-backs: the crash also happens with APS5_GPU_NO_WRITEBACK=1, where GPU results are never written back to guest memory, and with APS5_EAGER_WRITEBACK=1. So the deferred storage write-back over freed memory (#5934, #6960) is not required for it.
  • Not overlapping mappings: an APS5_TRACE_MEMORY run (which crashed at 298 s) has no map that overlaps a live mapping, no physical allocation that overlaps a live one, and no physical range mapped at two live addresses.
    • Both 0x166cfbf chunks lie in 0x225a…. The trace shows the title tearing down 0x225a40000+0x294000 (remap fixed ... phys=-1, then unmap). It later maps 0x225a00000+0x2c0000 with different physical memory (phys=0x25030000). That is the title reusing the range and is not by itself an emulator error, but it is where the corrupted chunks were.
  • Code paths read and found bounded:
    • File reads: APR _readFile, pread/read/_read, the Windows positioned transfer and archived-file reads copy exactly the requested size.
    • Guest arena: the Windows guest arena never discards or re-zeroes live pages.
    • Signal delivery: the title receives 600 to 875 SIGUSR1 per run, from its GC's thread suspension. Delivery places its frame below the 128-byte red zone, and restores ymm0–15 when AVX is present.

Goat Simulator 3 (PPSA04158, UE4, #10040) shows the same class on Windows: guest heap memory overwritten while in use, during its loading burst at 150–230 s, in about 1 run in 6, at seven different sites. For example, a free-list head holding UTF-16 text, and an APR command whose opcode dword changes from 1 to 0 between libSceAmpr building it and the submit. That title receives no guest signals and had no storage write-backs, so whatever the writer is, it is not specific to Unity or to one engine. No Linux or macOS run of either title is on record, so it is not known whether this is Windows-only.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6175030957 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/15350). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-11-03T02:25:05Z. --- ### What happens Spirit of the Island crashes in its own heap allocator in about half of the runs, during the load after a new game is confirmed (about 217 s in): `FATAL: unhandled exception 0xc0000005 ... app.exe+0x166cfbf`. A heap chunk's size field holds the chunk's own address with the low bit set. ### Title, test or build step PPSA13934 (Spirit of the Island) 01.000.000, Unity with IL2CPP. Bring-up thread: #15337. ### AnyPS5 commit Libraries from `main` 7feb37ee3e, Release, with no local changes. The executable was converted on 2026-10-20 by that day's relinker. ### System Windows 11 Enterprise 10.0.22621, AMD Ryzen 9 5950X (32 threads, 64 GiB), Radeon RX 6700 XT with the AMD proprietary driver 26.10.1, MinGW-w64 GCC 15.2.0 UCRT. ### Host report No `ANYPS5_HOST_REPORT=1` block was captured. The same facts come from the `aps5-summary.jsonl` of a traced run on these libraries: commit `7feb37ee3e30`, not dirty, `AMD Radeon RX 6700 XT`, `AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)`, `Windows 10.0.22621`, `AMD Ryzen 9 5950X 16-Core Processor`, 32 threads, 65457 MiB, 1920x1080. ### Steps to reproduce The title is started with scripted input through `APS5_PAD_INPUT_FILE` (`tools/pad_input.py`), with text posted to the window for the name fields: - **Title:** cross at 90 s on the title screen. - **New game:** a name and a property name typed through the IME, then R1 ×5 through the character tabs and Options at 210 s to confirm. The new save then loads the island. The crash comes 6 to 7 s after the confirmation (216.8 s and 216.9 s), or later during the first minute on the island. In 9 runs on the libraries above, 4 crashed: | Mode | Runs | Crashed | |---|---|---| | default | 4 | 2 | | `APS5_EAGER_WRITEBACK=1` | 1 | 1 | | `APS5_GPU_NO_WRITEBACK=1` | 4 | 1 | The other runs reached island gameplay and ran to their 330 s limit. ### Log The two crashes at the same site (default mode, then `APS5_GPU_NO_WRITEBACK=1`): ``` FATAL: unhandled exception 0xc0000005 on thread 218992 '' rip 0x000000014166cfbf app.exe+0x166cfbf read of 0x000000044b4fff50 rax 0000000225a7ffa0 rbx 0000000225a7ffa0 rcx 0000000225a7ffa1 rdx 0000000225a7ff98 rsi 0000000225a7ffa0 rdi 0000000200044500 rbp 000000000060b1c0 rsp 000000000060b1a8 [rax] 0000000000000000 0000000225a7ffa1 0000000000000002 0000000000000000 ... FATAL: unhandled exception 0xc0000005 on thread 193524 '' rip 0x000000014166cfbf app.exe+0x166cfbf read of 0x000000044b5ffdd0 rax 0000000225affee0 rbx 0000000225affee0 rcx 0000000225affee1 rdx 0000000225affed8 ``` The code at the fault walks heap chunks: ``` 14166cfb0 mov 0x8(%rsi),%rdx ; chunk size field 14166cfb7 add $0xfffffffffffffff8,%rdx 14166cfbb and $0xfffffffffffffffc,%rdx 14166cfbf mov 0x18(%rsi,%rdx,1),%rcx ; next chunk's header: faults ``` In both crashes the size field `[chunk+8]` is the chunk's own address with bit 0 set (`0x225a7ffa1` at `0x225a7ffa0`, `0x225affee1` at `0x225affee0`), so the walk jumps to about twice the address. The other two crashes are elsewhere in the same title: - **`Loading.PreloadManager`:** a write to `0x18` at `app.exe+0x166cb3c`, in the same allocator code. - **Low-stack thread:** a read of `0x18` at `app.exe+0xa7072e`. ### What was checked All on the libraries above, on Windows: - **Not GPU write-backs:** the crash also happens with `APS5_GPU_NO_WRITEBACK=1`, where GPU results are never written back to guest memory, and with `APS5_EAGER_WRITEBACK=1`. So the deferred storage write-back over freed memory (#5934, #6960) is not required for it. - **Not overlapping mappings:** an `APS5_TRACE_MEMORY` run (which crashed at 298 s) has no map that overlaps a live mapping, no physical allocation that overlaps a live one, and no physical range mapped at two live addresses. - Both `0x166cfbf` chunks lie in `0x225a…`. The trace shows the title tearing down `0x225a40000+0x294000` (`remap fixed ... phys=-1`, then `unmap`). It later maps `0x225a00000+0x2c0000` with different physical memory (`phys=0x25030000`). That is the title reusing the range and is not by itself an emulator error, but it is where the corrupted chunks were. - **Code paths read and found bounded:** - **File reads:** APR `_readFile`, `pread`/`read`/`_read`, the Windows positioned transfer and archived-file reads copy exactly the requested size. - **Guest arena:** the Windows guest arena never discards or re-zeroes live pages. - **Signal delivery:** the title receives 600 to 875 `SIGUSR1` per run, from its GC's thread suspension. Delivery places its frame below the 128-byte red zone, and restores ymm0–15 when AVX is present. **Goat Simulator 3** (PPSA04158, UE4, #10040) shows the same class on Windows: guest heap memory overwritten while in use, during its loading burst at 150–230 s, in about 1 run in 6, at seven different sites. For example, a free-list head holding UTF-16 text, and an APR command whose opcode dword changes from 1 to 0 between `libSceAmpr` building it and the submit. That title receives no guest signals and had no storage write-backs, so whatever the writer is, it is not specific to Unity or to one engine. No Linux or macOS run of either title is on record, so it is not known whether this is Windows-only. AI-assisted: yes.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#15350
No description provided.