Skip to content

mermaid: Fix stack overflow when laying out deeply nested subgraphs (#58325) (cherry-pick to preview)#58396

Merged
zed-zippy[bot] merged 1 commit into
v1.5.xfrom
cherry-pick-v1.5.x-4e949a1c
Jun 3, 2026
Merged

mermaid: Fix stack overflow when laying out deeply nested subgraphs (#58325) (cherry-pick to preview)#58396
zed-zippy[bot] merged 1 commit into
v1.5.xfrom
cherry-pick-v1.5.x-4e949a1c

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #58325 to preview


Closes FR-49

This PR fixes stack overflow in flowcharts with deeply nested subgraphs.
Rewrote recursive call to iterate with an explicit stack on heap. Added
test which reproduces the overflow.

We use our fork now, with patch on existing v0.4.0:
zed-industries/merman@1c765dc

Release Notes:

  • Fixed a crash in when rendering Mermaid diagram flowcharts with deeply
    nested subgraphs.

…58325)

Closes FR-49

This PR fixes stack overflow in flowcharts with deeply nested subgraphs.
Rewrote recursive call to iterate with an explicit stack on heap. Added
test which reproduces the overflow.

We use our fork now, with patch on existing v0.4.0:
zed-industries/merman@1c765dc

Release Notes:

- Fixed a crash in when rendering Mermaid diagram flowcharts with deeply
nested subgraphs.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 3, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label Jun 3, 2026
@zed-zippy zed-zippy Bot merged commit 96f8ebb into v1.5.x Jun 3, 2026
41 checks passed
@zed-zippy zed-zippy Bot deleted the cherry-pick-v1.5.x-4e949a1c branch June 3, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant