Skip to content

fix(macros): stack overflow in invoke handler - #14170

Merged
Legend-Master merged 1 commit into
tauri-apps:devfrom
Legend-Master:remove-inline-command-wrapper
Sep 8, 2025
Merged

fix(macros): stack overflow in invoke handler#14170
Legend-Master merged 1 commit into
tauri-apps:devfrom
Legend-Master:remove-inline-command-wrapper

Conversation

@Legend-Master

@Legend-Master Legend-Master commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

Fix the stack overflow when having too many commands in a single invoke handler in release build

Fix #14167

So it turned out we can't really rely on the compiler to optimize this away, let's remove the inline(always) in release build as well

References:

@Legend-Master
Legend-Master requested a review from a team as a code owner September 8, 2025 04:54
@github-actions

github-actions Bot commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

Package Changes Through 810e9e9

There are 9 changes which include @tauri-apps/api with minor, tauri-cli with minor, tauri-utils with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri with minor, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-macros with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.8.0 2.9.0
tauri-utils 2.7.0 2.8.0
tauri-bundler 2.6.1 2.7.0
tauri-runtime 2.8.0 2.9.0
tauri-runtime-wry 2.8.1 2.9.0
tauri-codegen 2.4.0 2.4.1
tauri-macros 2.4.0 2.4.1
tauri-plugin 2.4.0 2.4.1
tauri-build 2.4.1 2.4.2
tauri 2.8.5 2.9.0
@tauri-apps/cli 2.8.4 2.9.0
tauri-cli 2.8.4 2.9.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master

Copy link
Copy Markdown
Contributor Author

@Honghe could you give this a try in your app and see if it indeed fixes the problem?

Honghe added a commit to Honghe/clash-verge-rev that referenced this pull request Sep 8, 2025
@Honghe

Honghe commented Sep 8, 2025

Copy link
Copy Markdown

@Honghe could you give this a try in your app and see if it indeed fixes the problem?

It works. Honghe/clash-verge-rev@64efdfb#diff-fe4c6a80a21e81339e2e0faeb9134d0f9636c168987df13c8abf1927a1caee39

@Legend-Master
Legend-Master merged commit 69476d8 into tauri-apps:dev Sep 8, 2025
20 checks passed
@Legend-Master
Legend-Master deleted the remove-inline-command-wrapper branch September 8, 2025 09:38
@Tunglies

Tunglies commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

Hey @FabianLars and @Legend-Master . When do you plan to push the next bugfix release? This bug has a big impact on our community and prevents many users from using the software. Should we use the git version for temporary?

@FabianLars

Copy link
Copy Markdown
Member

hmm the branch is already polluted with minor changes but since we'll all be out of office for the next 2-3 weeks i'll see if i can release a small minor today.

@Tunglies

Tunglies commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

hmm the branch is already polluted with minor changes but since we'll all be out of office for the next 2-3 weeks i'll see if i can release a small minor today.

Hello FabianLars, I wonder if tauri would publish the new release this month?

@FabianLars

Copy link
Copy Markdown
Member

yes, sorry for the delay on that one

Tunglies added a commit to clash-verge-rev/clash-verge-rev that referenced this pull request Oct 20, 2025
Upstream Tauri fixed the stack overflow in the invoke handler
(tauri-apps/tauri#14170) in v2.9.0,
so we can safely use opt-level 3 now.
Martinsuper pushed a commit to Martinsuper/clash-verge-rev that referenced this pull request May 12, 2026
Upstream Tauri fixed the stack overflow in the invoke handler
(tauri-apps/tauri#14170) in v2.9.0,
so we can safely use opt-level 3 now.
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.

[bug] generate_handler! can cause stack overflows when having too many commands

4 participants