diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-01-03 02:13:08 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-01-03 02:13:08 +0800 |
| commit | 10614e04929a6d109a5e90524e446b637aaf0c13 (patch) | |
| tree | eb11aeb7b641187f207e3b572c5184cf3526b463 /build/src/kernel/initcode.o | |
| parent | 1c8e37f63d413a559825020289178d442537449e (diff) | |
| download | lume-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/initcode.o')
| -rw-r--r-- | build/src/kernel/initcode.o | bin | 31496 -> 31528 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/build/src/kernel/initcode.o b/build/src/kernel/initcode.o Binary files differindex c575853..cb2dd53 100644 --- a/build/src/kernel/initcode.o +++ b/build/src/kernel/initcode.o |
