Skip to content

Fix walloc.d#26

Merged
LunaTheFoxgirl merged 1 commit into
Inochi2D:mainfrom
QuantumSegfault:fix-walloc
Jun 5, 2026
Merged

Fix walloc.d#26
LunaTheFoxgirl merged 1 commit into
Inochi2D:mainfrom
QuantumSegfault:fix-walloc

Conversation

@QuantumSegfault

Copy link
Copy Markdown
Contributor

Fixes several issues (including some crippling ones) with the walloc port.

  • Casting in get_large_object was done incorrectly, causing the pointer arithmetic to be wrong leading to corruption during free (caught be later assertions).
  • realloc (not part of original port) had the old vs. new size comparison inverted
  • get_alloc_size (used by realloc; not original) logic appeared incorrect for small allocations (comparing granules instead of original kind against the chunk_kind enum). Unclear how big of an issue it was.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

@LunaTheFoxgirl

Requesting review.

@LunaTheFoxgirl

Copy link
Copy Markdown
Member

LGTM, however can you verify to me that no LLM/AI Agent was used in this PR?

@LunaTheFoxgirl LunaTheFoxgirl merged commit ed9ee08 into Inochi2D:main Jun 5, 2026
23 of 35 checks passed
@LunaTheFoxgirl

Copy link
Copy Markdown
Member

Confirmed in DMs, merged.

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