Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed sysmalloc_int_free.c MALLOC_ALIGN #184

Merged
merged 1 commit into from
May 2, 2024

Conversation

gfelber
Copy link
Contributor

@gfelber gfelber commented May 2, 2024

sry to bump this put i saw you modified sysmalloc_int_free.c ae4dbf5 4ed6f19

<< #define MALLOC_ALIGN 0x10L
>> #define MALLOC_ALIGN (SIZE_SZ*2)

i believe this happened because you merged the 2.23 example with the others,
but this breaks the showcase for x86 (32 bit), so maybe revert theses changes if possible?
in some earlier heap version glibc changed their heap alignment on x86 (32bit) to always be 0x10 (and not SIZE_SZ*2)
https://elixir.bootlin.com/glibc/glibc-2.39/source/sysdeps/i386/malloc-alignment.h#L22
this wasn't true for 2.23, that's why this version was slightly different
https://elixir.bootlin.com/glibc/glibc-2.23/source/malloc/malloc.c#L353

@gfelber
Copy link
Contributor Author

gfelber commented May 2, 2024

heap alignment on x86 (32bit) seems to have been changed to 0x10 since 2.26
https://elixir.bootlin.com/glibc/glibc-2.26/source/sysdeps/i386/malloc-alignment.h#L22

@Kyle-Kyle
Copy link
Contributor

Kyle-Kyle commented May 2, 2024

Good to learn about that. My knowledge about 32bit heap didn't get updated and thought it was always SIZE_SZ*2. my bad. Thank you for the correction!

@Kyle-Kyle Kyle-Kyle merged commit c6a55fe into shellphish:master May 2, 2024
12 checks passed
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.

None yet

2 participants