Skip to content

Conversation

@vicLin8712
Copy link
Collaborator

@vicLin8712 vicLin8712 commented Oct 26, 2025

Issue

commit 44eed33
The split_block() helper could incorrectly trigger a kernel panic when the requested allocation size was exactly equal to the current memory block size.

Fix

Refer to PR #21

Adjusted the condition check in split_block() to properly handle equal-size requests, preventing false positive panic conditions.


Summary by cubic

Fix false panic in split_block() when the requested size equals the block size. Change the check from >= to > so exact-size requests no longer trigger ERR_HEAP_CORRUPT.

The split_block() helper incorrectly triggered a panic when the
requested size matched the block size. Adjust the condition to
avoid the false positive alarm.
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link
Collaborator

@visitorckw visitorckw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jserv jserv merged commit 7dbdfc6 into sysprog21:main Oct 27, 2025
1 check passed
@jserv
Copy link
Contributor

jserv commented Oct 27, 2025

Thank @vicLin8712 for contributing!

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.

3 participants