Skip to content

Unmap guest memory when precompilation finishes - #6

Closed
Zulux91 wants to merge 1 commit into
ARMSX2:masterfrom
Zulux91:pr/vm-close-after-precompile
Closed

Unmap guest memory when precompilation finishes#6
Zulux91 wants to merge 1 commit into
ARMSX2:masterfrom
Zulux91:pr/vm-close-after-precompile

Conversation

@Zulux91

@Zulux91 Zulux91 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The precompilation queue calls vm::init() so that ppu_register_range has somewhere to register, but nothing ever unmapped it again. vm::close() is only reached from Emu.Stop(), and precompilation deliberately never boots anything.

So the blocks stayed mapped past "Finalization". The next vm::init(), either the next workload or Emulator::Load() booting a game, assigns over g_locations and destroys them, which trips ensure(!is_valid()) in ~block_t() and takes the whole process down.

Easy to reproduce: install firmware and then boot a game without restarting the app. The firmware pass leaves five live blocks behind and the boot dies inside vm::ps3_::init() before it reads a byte of the disc.

The precompilation queue calls vm::init() so that ppu_register_range has
somewhere to register, but nothing ever unmapped it again. vm::close() is only
reached from Emu.Stop(), and precompilation deliberately never boots anything.

So the blocks stayed mapped past "Finalization". The next vm::init(), either
the next workload or Emulator::Load() booting a game, assigns over g_locations
and destroys them, which trips ensure(!is_valid()) in ~block_t() and takes the
whole process down.

Easy to reproduce: install firmware and then boot a game without restarting the
app. The firmware pass leaves five live blocks behind and the boot dies inside
vm::ps3_::init() before it reads a byte of the disc.
@jpolo1224 jpolo1224 closed this Aug 13, 2026
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