Skip to content

Commit 69476d8

Browse files
fix(macros): stack overflow in invoke handler (#14170)
1 parent f5851ee commit 69476d8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri": "patch:bug"
3+
"tauri-macros": "patch:bug"
4+
---
5+
6+
Fix the stack overflow when having too many commands in a single invoke handler in release build

crates/tauri-macros/src/command/wrapper.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,9 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream {
283283
macro_rules! #wrapper {
284284
// double braces because the item is expected to be a block expression
285285
($path:path, $invoke:ident) => {
286-
// The IIFE here is for preventing stack overflow on Windows debug build,
286+
// The IIFE here is for preventing stack overflow on Windows,
287287
// see https://github.com/tauri-apps/tauri/issues/12488
288288
{
289-
#[cfg_attr(not(debug_assertions), inline(always))]
290289
move || {
291290
#[allow(unused_imports)]
292291
use #root::ipc::private::*;

0 commit comments

Comments
 (0)