Lameguy64 / PSn00bSDK

The most powerful open source SDK for the PS1 (as far as open source PS1 SDKs go). Not recommended for beginner use.
Other
838 stars 68 forks source link

`realloc` size in `BlockHeader` incorrect causing `_find_fit` negative sizes #81

Closed EngineersBox closed 4 days ago

EngineersBox commented 9 months ago

The BlockHeader.size field is incorrectly set, still including the sizeof(BlockHeader) overhead included in the aligned value used as the size of the allocated block.

This causes the _find_fit function to improperly calculate the size of the free block for the currently inspected block. More details in the associated issue I raised here: https://github.com/Lameguy64/PSn00bSDK/issues/80

EngineersBox commented 8 months ago

This PR is good for a review if anyone has the time.

spicyjpeg commented 4 days ago

Finally got to take a look at the current state of PSn00bSDK again after neglecting it for a rather long time at this point. Thank you for your contributions.

As for the two PRs marked as drafts, I am currently planning to overhaul the repo in order to make it easier to use it as a git submodule; we can further discuss how to handle them while I'm at it. If you want, feel free to reach out to me (as well as several PSn00bSDK users and developers of other PS1 SDK projects) through the PSX.Dev Discord server.