summaryrefslogtreecommitdiff
path: root/build/src/kernel
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-01-03 02:13:08 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-01-03 02:13:08 +0800
commit10614e04929a6d109a5e90524e446b637aaf0c13 (patch)
treeeb11aeb7b641187f207e3b572c5184cf3526b463 /build/src/kernel
parent1c8e37f63d413a559825020289178d442537449e (diff)
downloadlume-10614e04929a6d109a5e90524e446b637aaf0c13.tar.gz
lume-10614e04929a6d109a5e90524e446b637aaf0c13.tar.xz
Fix: critical malloc size calculation bug
Summary: - Fixed an integer arithmetic error in malloc() where 'nunits' was initialized to 0, causing incorrect heap sizing. - This bug caused malloc to return pointers pointing to unmapped memory pages, leading to Store Page Fault (scause 15) at process boundaries. - Switched memory allocator logic to use byte-based size calculation instead of K&R style units to prevent off-by-one errors. Improvements: - Shell now starts successfully without segfaults.
Diffstat (limited to 'build/src/kernel')
-rw-r--r--build/src/kernel/initcode.obin31496 -> 31528 bytes
-rw-r--r--build/src/kernel/mm/vm.obin234008 -> 234008 bytes
-rw-r--r--build/src/kernel/proc/exec.obin62896 -> 64304 bytes
-rw-r--r--build/src/kernel/proc/proc.obin221432 -> 225240 bytes
-rw-r--r--build/src/kernel/trap/handler.obin71232 -> 72624 bytes
5 files changed, 0 insertions, 0 deletions
diff --git a/build/src/kernel/initcode.o b/build/src/kernel/initcode.o
index c575853..cb2dd53 100644
--- a/build/src/kernel/initcode.o
+++ b/build/src/kernel/initcode.o
Binary files differ
diff --git a/build/src/kernel/mm/vm.o b/build/src/kernel/mm/vm.o
index d73e9a6..96840aa 100644
--- a/build/src/kernel/mm/vm.o
+++ b/build/src/kernel/mm/vm.o
Binary files differ
diff --git a/build/src/kernel/proc/exec.o b/build/src/kernel/proc/exec.o
index 5b735ed..26a77b6 100644
--- a/build/src/kernel/proc/exec.o
+++ b/build/src/kernel/proc/exec.o
Binary files differ
diff --git a/build/src/kernel/proc/proc.o b/build/src/kernel/proc/proc.o
index 7ae741b..940c575 100644
--- a/build/src/kernel/proc/proc.o
+++ b/build/src/kernel/proc/proc.o
Binary files differ
diff --git a/build/src/kernel/trap/handler.o b/build/src/kernel/trap/handler.o
index 44a2baa..bd42409 100644
--- a/build/src/kernel/trap/handler.o
+++ b/build/src/kernel/trap/handler.o
Binary files differ