Skip to content
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

analysis: Avoid overflow when determining whether to emit a parameter #1471

Merged
merged 1 commit into from May 12, 2023

Conversation

kawadakk
Copy link
Contributor

Fixes a debug build of GIR panicking when processing non-static async methods.

  thread 'main' panicked at 'attempt to subtract with overflow', ...\gtk-rs-gir\src\analysis\function_parameters.rs:243:46
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/4087deaccd8bceb458c9610d29744d5f3504c5c0/library\std\src/panicking.rs:577:5
     1: core::panicking::panic_fmt
               at /rustc/4087deaccd8bceb458c9610d29744d5f3504c5c0/library\core\src/panicking.rs:67:14
     2: core::panicking::panic
               at /rustc/4087deaccd8bceb458c9610d29744d5f3504c5c0/library\core\src/panicking.rs:117:5
     3: libgir::analysis::function_parameters::analyze
     4: libgir::analysis::functions::analyze_function
     5: libgir::analysis::functions::analyze
     6: libgir::analysis::object::interface
     7: libgir::analysis::analyze
     8: libgir::analysis::run
     9: gir::main
               at ...\gtk-rs-gir\src\main.rs:192:9

Fixes a debug build of GIR panicking when processing non-static async
methods.
@sdroege sdroege merged commit 55b381b into gtk-rs:master May 12, 2023
6 checks passed
@kawadakk kawadakk deleted the patches/fix-param-index-oob branch May 12, 2023 06:05
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.

None yet

3 participants