Commit 9e55af4
committed
Panic on heap corruption detected in memory allocator
The memory allocator previously attempted to continue execution even if
validate_block() failed, which indicates unexpected heap corruption or
invalid memory operations. Once the heap is corrupted, the kernel can
no longer guarantee safe or correct behavior.
Invoke panic(ERR_HEAP_CORRUPT) when validate_block() fails in malloc(),
free(), or realloc(), ensuring the kernel halts immediately on fatal
allocator errors.1 parent a49b345 commit 9e55af4
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
| |||
239 | 242 | | |
240 | 243 | | |
241 | 244 | | |
242 | | - | |
| 245 | + | |
| 246 | + | |
243 | 247 | | |
| 248 | + | |
244 | 249 | | |
245 | 250 | | |
246 | 251 | | |
| |||
0 commit comments