Skip to content

Fix memory leak in allocateSpilled - #2328

Open
lennyJL wants to merge 1 commit into
NVIDIA:masterfrom
lennyJL:fix/fix-mem-leak-in-allocateSpilled
Open

Fix memory leak in allocateSpilled#2328
lennyJL wants to merge 1 commit into
NVIDIA:masterfrom
lennyJL:fix/fix-mem-leak-in-allocateSpilled

Conversation

@lennyJL

@lennyJL lennyJL commented Aug 7, 2026

Copy link
Copy Markdown

Description

When function allocateSpilled creates a new Hunk, it unconditionally overwrites top->above with the new Hunk pointer. If top->above already pointed to an existing Hunk left behind by a prior Push/Pop cycle, that existing Hunk becomes detached from the chain and leaks.

More details can be found in the issue corresponding to this PR.

Related Issues

Fixes #2324

Changes & Impact

  • None
  • Bug fix within function allocateSpilled only

Performance Impact

  • None

When allocateSpilled creates a new Hunk, it unconditionally
overwrites `top->above` with the new Hunk pointer. If
`top->above` already pointed to an existing Hunk left behind
by a prior Push/Pop cycle, that existing Hunk becomes detached
from the chain and leaks.

Signed-off-by: JingLi <1162004224@qq.com>
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.

[Issue]: Memory leak risk of function allocateSpilled

1 participant