-
Notifications
You must be signed in to change notification settings - Fork 13k
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
socket2 failed to complie: const parameter 'bufs/#1
('bufs/#1/1) out of range when instantiating args=[]
#135515
Labels
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Comments
Xuanwo
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jan 15, 2025
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jan 15, 2025
Just hit this when compiling |
saethlin
added
the
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
label
Jan 15, 2025
This will repro
searched nightlies: from nightly-2025-01-12 to nightly-2025-01-15 That's #135313 But I feel like based on what that PR does, this is a pre-existing bug. |
saethlin
added
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
T-types
Relevant to the types team, which will review and decide on the PR/issue.
and removed
E-needs-bisection
Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Jan 15, 2025
I'll check it out |
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 15, 2025
Rollup merge of rust-lang#135520 - compiler-errors:mono-impossible-drop-with-lifetimes, r=BoxyUwU Make sure we actually use the right trivial lifetime substs when eagerly monomorphizing drop for ADTs Absolutely clueless mistake of mine. Whoops. When eagerly collecting mono items, when we encounter an ADT, we try to monomorphize its drop glue. In rust-lang#135313, I made it so that this acts more like eagerly monomorphizing functions, where we allow (in this case) ADTs with lifetimes, since those can be erased by codegen. However, I did not account for the call to `instantiate_and_check_impossible_predicates`, which was still passing an empty set of args. This means that if the ADT in question had any predicates, we'd get an index out of bounds panic. This PR creates the correct set of args for the ADT. Fixes rust-lang#135515. I assume that this manifests in that issue because of `-Clink-dead-code` or something.
This was referenced Jan 15, 2025
This was referenced Jan 16, 2025
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Jan 16, 2025
Update docs for `-Clink-dead-code` to discourage its use The `-Clink-dead-code` flag was originally added way back in rust-lang#31368, apparently to help improve the output of some older forms of code coverage measurement, and also to address some use-cases for wanting to suppress linker flags like `-dead_strip` and `--gc-section`. In the past it might have also been useful in conjunction with `-Cinstrument-coverage`, but subsequent improvements to coverage instrumentation have made it unnecessary there. [It is also currently used by cargo-fuzz by default](rust-fuzz/cargo-fuzz#391), for reasons that are possibly no longer relevant. --- The flag currently does more than its name suggests, affecting not just linker flags, but also monomorphization decisions. It has also contributed to ICEs (e.g. rust-lang#135515) that would not have occurred without link-dead-code. --- For now, this PR just updates the documentation to be more realistic about what the flag does, and when it should be used (approximately never). In the future, it might be worth looking into properly deprecating this flag, and perhaps making it a no-op if feasible.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jan 17, 2025
Rollup merge of rust-lang#135561 - Zalathar:link-dead-code, r=saethlin Update docs for `-Clink-dead-code` to discourage its use The `-Clink-dead-code` flag was originally added way back in rust-lang#31368, apparently to help improve the output of some older forms of code coverage measurement, and also to address some use-cases for wanting to suppress linker flags like `-dead_strip` and `--gc-section`. In the past it might have also been useful in conjunction with `-Cinstrument-coverage`, but subsequent improvements to coverage instrumentation have made it unnecessary there. [It is also currently used by cargo-fuzz by default](rust-fuzz/cargo-fuzz#391), for reasons that are possibly no longer relevant. --- The flag currently does more than its name suggests, affecting not just linker flags, but also monomorphization decisions. It has also contributed to ICEs (e.g. rust-lang#135515) that would not have occurred without link-dead-code. --- For now, this PR just updates the documentation to be more realistic about what the flag does, and when it should be used (approximately never). In the future, it might be worth looking into properly deprecating this flag, and perhaps making it a no-op if feasible.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Code
I'm guessing it's related to the usage of const parameter.
The error could happen in socket2, log and many other crates.
Meta
rustc
Error output
Also reproduced locally with the same rustc version:
Backtrace
Here is the
rustc-ice-2025-01-15T02_49_11-9109.txt
rustc-ice-2025-01-15T02_49_11-9109.txt
The text was updated successfully, but these errors were encountered: