-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(macros): invoke handler stack overflow #13217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(macros): invoke handler stack overflow #13217
Conversation
Package Changes Through e05c624There are 8 changes which include @tauri-apps/api with minor, tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils with minor, tauri-bundler with minor, tauri-runtime with minor, tauri-runtime-wry with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
| // see https://github.com/tauri-apps/tauri/issues/12488 | ||
| { | ||
| #[cfg_attr(not(debug_assertions), inline(always))] | ||
| move || { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh so nice that Rust optimizes this for us on release ❤️ awesome idea
Fix #12488
This is a very similar bug as #9882, the debug build of rust seems unable to optimize the function stack size, and with a small stack size limit on Windows, it overflows, and in release build, the optimization kicks in and there're no problems
So this fix turns each macro into a closure in debug build so rust wouldn't allocate the memory all at once and crash