Skip to content

barencoder: subtyping overflow #186

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

Closed
lcnr opened this issue Apr 25, 2025 · 1 comment · Fixed by rust-lang/rust#140305
Closed

barencoder: subtyping overflow #186

lcnr opened this issue Apr 25, 2025 · 1 comment · Fixed by rust-lang/rust#140305
Assignees
Labels
from-crater A regression found via a crater run, not part of our test suite

Comments

@lcnr
Copy link
Contributor

lcnr commented Apr 25, 2025

https://crater-reports.s3.amazonaws.com/pr-133502-4/try%230c7fed2b7584d310ca8221267fa1b3bec4df427f/reg/webauthn-authenticator-rs-0.5.1/log.txt

#![recursion_limit = "16"]
fn main() {
    match 0 {
        0 => None,
        1 => None,
        2 => None,
        3 => None,
        4 => None,
        5 => None,
        6 => None,
        7 => None,
        8 => None,
        9 => None,
        10 => None,
        11 => None,
        12 => None,
        13 => None,
        14 => None,
        15 => None,
        16 => None,
        17 => None,
        _ => Some(1u32),
    };
}

succeeds with old solver, fails with

error[E0275]: overflow assigning `_` to `u32`
 --> src/main.rs:4:14
  |
4 |         0 => None,
  |              ^^^^
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "32"]` attribute to your crate (`main`)
@compiler-errors
Copy link
Member

that is so funny

@lcnr lcnr added the from-crater A regression found via a crater run, not part of our test suite label Apr 25, 2025
@lcnr lcnr moved this from unknown to in progress in -Znext-solver=globally Apr 25, 2025
@lcnr lcnr self-assigned this Apr 25, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 25, 2025
Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
jhpratt added a commit to jhpratt/rust that referenced this issue Apr 26, 2025
Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 26, 2025
Rollup merge of rust-lang#140305 - compiler-errors:coerce-loop, r=lcnr

Track per-obligation recursion depth only if there is inference in the new solver

Track how many times an obligation has been processed in the fulfillment context by reusing its recursion depth, and only overflow if a singular (root) goal hits the limit.

This also fixes a (probably theoretical at this point) problem where we don't detect pseudo-hangs across `select_where_possible` calls.

fixes rust-lang/trait-system-refactor-initiative#186

r? lcnr
@lcnr lcnr moved this from in progress to done in -Znext-solver=globally Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from-crater A regression found via a crater run, not part of our test suite
Projects
2 participants