-
Notifications
You must be signed in to change notification settings - Fork 13.4k
stack overflow in ImproperCTypesVisitor::{check_type_for_ffi, check_variant_for_ffi} #130310
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Open
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
L-improper_ctypes
Lint: improper_ctypes
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
@rustbot claim |
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 21, 2024
Rollup merge of rust-lang#130598 - gurry:130310-improper-types-stack-overflow, r=compiler-errors Add recursion limit to FFI safety lint Fixes rust-lang#130310 Now we check against `tcx.recursion_limit()` and raise an error if it the limit is reached instead of overflowing the stack.
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Sep 24, 2024
…mit, r=jieyouxu Revert "Add recursion limit to FFI safety lint" It's not necessarily clear if warning when we hit the recursion limit is the right thing to do, first of all. **More importantly**, this PR was implemented incorrectly in the first place; it was not decrementing the recursion limit when stepping out of a type, so it would trigger when a ctype has more than RECURSION_LIMIT fields *anywhere* in the type's set of recursively reachable fields. Reverts rust-lang#130598 Reopens rust-lang#130310 Fixes rust-lang#130757
compiler-errors
added a commit
to compiler-errors/rust
that referenced
this issue
Sep 24, 2024
…mit, r=jieyouxu Revert "Add recursion limit to FFI safety lint" It's not necessarily clear if warning when we hit the recursion limit is the right thing to do, first of all. **More importantly**, this PR was implemented incorrectly in the first place; it was not decrementing the recursion limit when stepping out of a type, so it would trigger when a ctype has more than RECURSION_LIMIT fields *anywhere* in the type's set of recursively reachable fields. Reverts rust-lang#130598 Reopens rust-lang#130310 Fixes rust-lang#130757
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 24, 2024
Rollup merge of rust-lang#130758 - compiler-errors:ctype-recursion-limit, r=jieyouxu Revert "Add recursion limit to FFI safety lint" It's not necessarily clear if warning when we hit the recursion limit is the right thing to do, first of all. **More importantly**, this PR was implemented incorrectly in the first place; it was not decrementing the recursion limit when stepping out of a type, so it would trigger when a ctype has more than RECURSION_LIMIT fields *anywhere* in the type's set of recursively reachable fields. Reverts rust-lang#130598 Reopens rust-lang#130310 Fixes rust-lang#130757
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
I-crash
Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
L-improper_ctypes
Lint: improper_ctypes
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: