Prevent hot-reload descriptor slots from overlapping image bytes#9795
Prevent hot-reload descriptor slots from overlapping image bytes#9795eluvane wants to merge 2 commits into
Conversation
|
@eluvane -- how do we validate these changes? is there a discussion somewhere or a related issue? The changes generally look ok to me -- but I need more information to understand why we need this. Did you experience any issues on Windows with hot reloading? |
There isn't a formal issue tracking this specifically, but the bug is not hypothetical - a colleague of mine actually encountered this collision (descriptor slots overlapping with reusable image bytes during hot-reload) in practice. We didn't open a separate ticket for it at the time and moved directly to implementing the fix. That said, I believe these changes are valuable regardless of whether the issue was formally tracked or independently reproduced elsewhere. It's reasonable to address this class of bug at its root before it surfaces downstream for other users. The added tests (fresh-descriptor rejection path and reclaimed-region clipping) provide coverage going forward, so this fix is deliberate and well-motivated rather than speculative. |
|
Just to add: if merging this requires going through a formal process of opening an issue and providing reproduction steps, feel free to just close the PR and keep the diff as a reference. I'm not really interested in going through the bureaucracy to prove the fix, so I'll just leave the code here for you to use or discard as you see fit |
|
No beauracracy here, Im just not sure where to start with testing this change. It may take me a bit more time to dig into this, Ill add it to my list and come back to it later. Maybe someone more familiar with this part of the codebase could help here. Thank you for sharing. |
This PR keeps hot-reload descriptor slots separate from reusable image bytes.
Reclaimed image regions are now clipped to the current descriptor floor before selection. Fresh descriptor allocation also fails when append storage has already reached the descriptor area, so rebuild workers cannot publish an image allocation that collides with descriptor slots.
Hot-reload allocation tests cover the fresh-descriptor rejection path and reclaimed-region clipping. The descriptor test helper now uses the write path so descriptor memory is committed before writes on Windows.