Skip to content

Raise the minimum handler stack to 16K#9

Open
codewiz wants to merge 2 commits into
reinauer:mainfrom
codewiz:raise-handler-stack
Open

Raise the minimum handler stack to 16K#9
codewiz wants to merge 2 commits into
reinauer:mainfrom
codewiz:raise-handler-stack

Conversation

@codewiz

@codewiz codewiz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The handler's deep paths (directory traversal, name normalization) can use more stack than a mountlist typically grants.

I got a MuGA low stack hit with 8KB of stack, and the -test version needs some more for RawDoFmt. Technically we could get away with 10-12KB of stack, but let's go safe with 16KB, matching the ROM filesystem.

codewiz added 2 commits June 26, 2026 00:15
The handler's deep paths (directory traversal, name normalization) can use
more stack than a mountlist typically grants. The previous 4K/8K swap
thresholds let a small mountlist stack through unhelped, risking an
overflow; guarantee at least 16K by swapping to a private stack when the
supplied one is smaller.
Match the handler's minimum stack so example mountlists don't trigger a
stack swap on first use.
@codewiz

codewiz commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Found while investigating issue #4.

@tomsmart1

Copy link
Copy Markdown

A good device/program detect low stack and extend it own stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants