Memory & Framebuffer Corruption Bug
Posted: Fri Nov 07, 2025 3:59 am
Hi all!
I am experiencing an issue that I believe may be related to faulty memory allocation. I have implemented a small driver that should allow my code to write to arbitrary positions on the Framebuffer. However, this seems to have uncovered an interesting bug that I cannot seem to track down.
Allocating memory seems to be corrupting the framebuffer memory - which I assume is due to liballoc allocating memory to the same address space as the Framebuffer itself. To try and resolve this, I implemented a check in my frame allocator to prevent it from allocating pages that (should) contain the framebuffer. However, this problem has not stopped.
Additionally, I appear to somehow be allocating memory that either cannot be written to, or gets overwritten almost instantly after (I can't really work out which), which is causing corruption in the memory buffer I have been writing to. (See below).
Does anyone have any idea what might be going on here?
(Github)
I am experiencing an issue that I believe may be related to faulty memory allocation. I have implemented a small driver that should allow my code to write to arbitrary positions on the Framebuffer. However, this seems to have uncovered an interesting bug that I cannot seem to track down.
Allocating memory seems to be corrupting the framebuffer memory - which I assume is due to liballoc allocating memory to the same address space as the Framebuffer itself. To try and resolve this, I implemented a check in my frame allocator to prevent it from allocating pages that (should) contain the framebuffer. However, this problem has not stopped.
Additionally, I appear to somehow be allocating memory that either cannot be written to, or gets overwritten almost instantly after (I can't really work out which), which is causing corruption in the memory buffer I have been writing to. (See below).
Does anyone have any idea what might be going on here?
(Github)