run.sh: mimalloc off by default (crash at world entry) #10
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!10
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/10/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@PhialsBasement on GitHub · 2026-11-29 16:26 UTC · original
PhialsBasement:mimalloc-off→main· +3 −1 · 1 files · 1 commits · closed without mergingWith
VICTORY_PORT_HEAP=1(set byrun.sh playsince9f573f8) the game crashes at its first world frame, every time, after the pipelines are prepared:Why: the crashing instruction walks a linked list the game keeps in an object (
r15 = node; [r15+8]; r15 = [r15]). The node pointer was0x10d9f4977ffe8: an address about 15 TB up with a tag bit (bit 48) set. That range is where mimalloc reserves its arenas, and the game keeps flags in the high bits of its pointers.Diagnostics builds take the switch too.
#[global_allocator]inport_heap.rsis only for non-diagnostics builds, butcopystat.rs's counting allocator calls throughPortHeapsince9f573f8.Bisect:
ca97da2runs.9f573f8crashes even with its seven other new switches off (CLAMP_PREFIX,RECYCLE_READBACK,PLACED_OBJECTS,VIEW_SHAPES,READ_POOL,RESIDENT_SWEEP,IMAGE_FENCE).5a60834runs withVICTORY_PORT_HEAP=0(played into the world and around it).This makes it default off:
VICTORY_PORT_HEAP=1still turns it on. Seen on Wine 11.21, 64 GB, RX 9070 XT, Series X profile. It may depend on where mimalloc's arenas land on a given machine.AI-assisted (Claude Code).
🤖 Generated with Claude Code
@PhialsBasement on GitHub · 2026-11-29 22:13 UTC · original
Superseded by
88c9c29, which keeps mimalloc and places its arenas below 2^40 (above the title's space). That fixes the same world-entry crash (title pointers into arenas ~15 TB up) without giving up mimalloc. Closing.Pull request closed