Skip to content

Found a bug in StackAllocator #27

Description

@ImYellowFish

image
There seems to be a bug in this line.
headerPtr = &allocationHeader;

Should be changed to *headerPtr = allocationHeader; otherwise the padding value is not recorded in the header memory.
I tested the original code, and the stack head address mismatches after one allocation and one free.

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions