Skip to content

p_saveg: P_UnArchiveSpecials allocates ceiling_t with PU_LEVSPEC instead of PU_LEVEL #133

Description

@sunsided

Context

P_UnArchiveSpecials in room/src/doom/p_saveg.rs deserializes special thinkers (ceilings, floors, platforms, etc.) from a save file.

C behavior

p_saveg.c allocates the ceiling_t block with the zone tag PU_LEVEL.

Rust behavior

The Rust port uses PU_LEVSPEC for consistency with other specials' allocation.

Impact

PU_LEVEL and PU_LEVSPEC differ in when the zone allocator may purge the block. Diverging from C here could change save-load fidelity or zone-fragmentation behavior in edge cases.

Location

room/src/doom/p_saveg.rs:1968 (flagged with // FIXME:).

Suggested fix

Either:

  • match C exactly and use PU_LEVEL for the unarchived ceiling_t, or
  • audit other specials' allocation tags in p_saveg.c and document why the Rust port standardizes on PU_LEVSPEC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-p_ceilngArea: p_ceilngarea-p_savegArea: p_savegbugSomething isn't workingkilo-auto-fixAuto-generated label by Kilokilo-triagedAuto-generated label by Kilo

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions