Commit Graph
1 Commits
Author SHA1 Message Date
libretroadmin c26315f8b3 stack-frame-sweep: every frame in the graphics objects, against the ceiling
CODING-GUIDELINES puts a ceiling on a function's stack frame and nothing
checked it. The frames this was written for were twelve kilobytes - a
glyph chunk in each of four font drivers, and a batch of overlays in the
Vulkan one - and they had been there for years, because a large local
array compiles, and runs, on a machine with a desktop's stack. It is
only a problem where the stack is smallest, which is the platform
nobody runs the suite on.

The sweep reads the release objects the menu-harness job already builds
and sums the probes a prologue makes, since a frame that size is built a
page at a time. Four functions are over and stay that way, each recorded
with what it is: a CRT mode switch, the shader cache written and read
once a pass, and a preview probe. Anything else over four kilobytes
fails, and a recorded one that grows fails too.

Checked by putting the twelve kilobyte glyph chunk back: the sweep names
it and the run fails.
2026-09-13 12:23:36 +02:00