From 62a50acef75621cda7e86ce1ed4b1f18fcfceb53 Mon Sep 17 00:00:00 2001 From: kudasai <47227786+kudasaixc@users.noreply.github.com> Date: Thu, 2 Jul 2026 20:35:38 +0200 Subject: [PATCH 1/4] fix(mem): typo = instead of - corrupted initial heap block size!! In memory_init(), line 46 assigns heap_end = HEAP_VIRT_START instead of subtracting, due to a =/- typo. This makes the first free block claim a size of ~3.2 GB (0xCFFFFFF0), so any large malloc returns pointers into unmapped virtual memory (page fault on write). It also resets heap_end to the heap start, so heap_grow() would remap fresh physical frames over existing blocks, corrupting the heap and leaking PMM frames. --- src/lib/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/memory.c b/src/lib/memory.c index ee118e3..e458fb3 100644 --- a/src/lib/memory.c +++ b/src/lib/memory.c @@ -43,7 +43,7 @@ void memory_init(void) { head = (block_header_t *) HEAP_VIRT_START; - head->size = (heap_end = HEAP_VIRT_START) - HEADER_SIZE; + head->size = (heap_end - HEAP_VIRT_START) - HEADER_SIZE; head->free = 1; head->next = NULL; head->prev = NULL; From ed9e2f9fc8709c1ebbcdf367f471adedd3c2c458 Mon Sep 17 00:00:00 2001 From: kudasai <47227786+kudasaixc@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:17:53 +0200 Subject: [PATCH 2/4] docs: add kudasai to the contributors section --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index b604799..0602522 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,18 @@ This project demonstrates low-level system programming concepts and serves as a Thank to all the contributors, you are the flame burning in our heart ❤️ +
+ + + kudasai + + +[![Grand Contributor](https://img.shields.io/badge/👑_GRAND_CONTRIBUTOR_🐐-FFD700?style=for-the-badge&labelColor=8B6914)](https://github.com/kudasaixc) + +✨🥇 **[kudasai](https://github.com/kudasaixc)** — *Bug Hunter Supreme* 🥇✨ + +
+
| Profile | GitHub | Role | From 27c4d8df117058f38d9859f0b283c542f3d7f511 Mon Sep 17 00:00:00 2001 From: kudasai <47227786+kudasaixc@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:20:23 +0200 Subject: [PATCH 3/4] docs: move kudasai into the contributors table --- README.md | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/README.md b/README.md index 0602522..4d28474 100644 --- a/README.md +++ b/README.md @@ -64,18 +64,6 @@ This project demonstrates low-level system programming concepts and serves as a Thank to all the contributors, you are the flame burning in our heart ❤️ -
- - - kudasai - - -[![Grand Contributor](https://img.shields.io/badge/👑_GRAND_CONTRIBUTOR_🐐-FFD700?style=for-the-badge&labelColor=8B6914)](https://github.com/kudasaixc) - -✨🥇 **[kudasai](https://github.com/kudasaixc)** — *Bug Hunter Supreme* 🥇✨ - -
-
| Profile | GitHub | Role | @@ -83,6 +71,7 @@ Thank to all the contributors, you are the flame burning in our heart ❤️ | im-nymii | [nymii](https://github.com/im-nymii) | Founder & Maintainer  | | llmaddie 2 | [Maddie](https://github.com/llmaddie) | Co-Founder & Maintainer | | pepedinho | [pepedinho](https://github.com/pepedinho) | Co-Maintainer | +| kudasai | [kudasai](https://github.com/kudasaixc) | [![Grand Contributor](https://img.shields.io/badge/👑_GRAND_CONTRIBUTOR_🐐-FFD700?style=for-the-badge&labelColor=8B6914)](https://github.com/kudasaixc)
✨🥇 *Bug Hunter Supreme* 🥇✨ | | switchcodeur | [switchcodeur](https://github.com/swtchcoder) | Contributor | | proxzr | [proxzr](https://github.com/proxzr) | Contributor | | Aomitsu | [Aomitsu](https://github.com/aomitsu) | Contributor | From 0e1b8ca7d5e2f743cafe133ac3748bcd115ead18 Mon Sep 17 00:00:00 2001 From: Charlotte <146101928+im-nymii@users.noreply.github.com> Date: Fri, 3 Jul 2026 19:23:06 +0200 Subject: [PATCH 4/4] Update kudasai's role in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d28474..7ac625b 100644 --- a/README.md +++ b/README.md @@ -71,13 +71,13 @@ Thank to all the contributors, you are the flame burning in our heart ❤️ | im-nymii | [nymii](https://github.com/im-nymii) | Founder & Maintainer  | | llmaddie 2 | [Maddie](https://github.com/llmaddie) | Co-Founder & Maintainer | | pepedinho | [pepedinho](https://github.com/pepedinho) | Co-Maintainer | -| kudasai | [kudasai](https://github.com/kudasaixc) | [![Grand Contributor](https://img.shields.io/badge/👑_GRAND_CONTRIBUTOR_🐐-FFD700?style=for-the-badge&labelColor=8B6914)](https://github.com/kudasaixc)
✨🥇 *Bug Hunter Supreme* 🥇✨ | | switchcodeur | [switchcodeur](https://github.com/swtchcoder) | Contributor | | proxzr | [proxzr](https://github.com/proxzr) | Contributor | | Aomitsu | [Aomitsu](https://github.com/aomitsu) | Contributor | | ivy-js | [Ivy-js](https://github.com/ivy-js) | Contributor | | gittihub-jpg | [gittihub-jpg](https://github.com/gittihub-jpg) | Contributor | | jesuiskoriel | [Jesuiskoriel](https://github.com/Jesuiskoriel) | Contributor | +| kudasaixc | [Kudasai](https://github.com/kudasaixc) | Contributor & Bug Hunter |