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

Revert "Add recursion limit to FFI safety lint" #130758

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

compiler-errors
Copy link
Member

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 #130598
Reopens #130310
Fixes #130757

@rustbot
Copy link
Collaborator

rustbot commented Sep 23, 2024

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 23, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, r=me after PR CI is green.

@jieyouxu jieyouxu assigned jieyouxu and unassigned nnethercote Sep 23, 2024
@compiler-errors
Copy link
Member Author

yolo

@bors r=jieyouxu rollup

@bors
Copy link
Contributor

bors commented Sep 23, 2024

📌 Commit 9050b33 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 23, 2024
@jieyouxu jieyouxu added the L-improper_ctypes Lint: improper_ctypes label Sep 23, 2024
compiler-errors added a commit to compiler-errors/rust that referenced this pull request 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
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2024
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#129545 (rustdoc: redesign toolbar and disclosure widgets)
 - rust-lang#130618 (Skip query in get_parent_item when possible.)
 - rust-lang#130727 (Check vtable projections for validity in miri)
 - rust-lang#130739 (Pass bootstrap cargo when `--stage 0` and `COMPILETEST_FORCE_STAGE0`)
 - rust-lang#130750 (Add new Tier-3 target: `loongarch64-unknown-linux-ohos`)
 - rust-lang#130758 (Revert "Add recursion limit to FFI safety lint")
 - rust-lang#130759 (Update books)
 - rust-lang#130762 (stabilize const_intrinsic_copy)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 24, 2024
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#129545 (rustdoc: redesign toolbar and disclosure widgets)
 - rust-lang#130618 (Skip query in get_parent_item when possible.)
 - rust-lang#130727 (Check vtable projections for validity in miri)
 - rust-lang#130750 (Add new Tier-3 target: `loongarch64-unknown-linux-ohos`)
 - rust-lang#130758 (Revert "Add recursion limit to FFI safety lint")
 - rust-lang#130759 (Update books)
 - rust-lang#130762 (stabilize const_intrinsic_copy)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fa1bd9b into rust-lang:master Sep 24, 2024
6 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 24, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-improper_ctypes Lint: improper_ctypes S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spurious "infinitely recursive" not ffi-safe warning
5 participants