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 ❤️ +
+
+
+[](https://github.com/kudasaixc)
+
+✨🥇 **[kudasai](https://github.com/kudasaixc)** — *Bug Hunter Supreme* 🥇✨
+
+
-
-
-[](https://github.com/kudasaixc)
-
-✨🥇 **[kudasai](https://github.com/kudasaixc)** — *Bug Hunter Supreme* 🥇✨
-
-
| [nymii](https://github.com/im-nymii) | Founder & Maintainer |
|
| [Maddie](https://github.com/llmaddie) | Co-Founder & Maintainer |
|
| [pepedinho](https://github.com/pepedinho) | Co-Maintainer |
+|
| [kudasai](https://github.com/kudasaixc) | [](https://github.com/kudasaixc)
| [switchcodeur](https://github.com/swtchcoder) | Contributor |
|
| [proxzr](https://github.com/proxzr) | Contributor |
|
| [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 ❤️
|
| [nymii](https://github.com/im-nymii) | Founder & Maintainer |
|
| [Maddie](https://github.com/llmaddie) | Co-Founder & Maintainer |
|
| [pepedinho](https://github.com/pepedinho) | Co-Maintainer |
-|
| [kudasai](https://github.com/kudasaixc) | [](https://github.com/kudasaixc)
| [switchcodeur](https://github.com/swtchcoder) | Contributor |
|
| [proxzr](https://github.com/proxzr) | Contributor |
|
| [Aomitsu](https://github.com/aomitsu) | Contributor |
|
| [Ivy-js](https://github.com/ivy-js) | Contributor |
|
| [gittihub-jpg](https://github.com/gittihub-jpg) | Contributor |
|
| [Jesuiskoriel](https://github.com/Jesuiskoriel) | Contributor |
+|
| [Kudasai](https://github.com/kudasaixc) | Contributor & Bug Hunter |