Skip to content

Fix generating deeply nested WIT types in wit-smith#2576

Merged
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:limit-generate-depth
Jul 20, 2026
Merged

Fix generating deeply nested WIT types in wit-smith#2576
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:limit-generate-depth

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

Fixes a fuzz bug fallout from #2565

@alexcrichton
alexcrichton requested a review from a team as a code owner July 20, 2026 17:54
@alexcrichton
alexcrichton requested review from dicej and removed request for a team July 20, 2026 17:54
Comment thread crates/wit-smith/src/generate.rs Outdated

// Bail out with a leaf type if a nested type here would nest too
// deeply.
if depth + 1 >= 50 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: consider turning the 50 into a named constant.

@alexcrichton
alexcrichton enabled auto-merge July 20, 2026 19:07
@alexcrichton
alexcrichton added this pull request to the merge queue Jul 20, 2026
Merged via the queue into bytecodealliance:main with commit 917be72 Jul 20, 2026
37 checks passed
@alexcrichton
alexcrichton deleted the limit-generate-depth branch July 20, 2026 19:23
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