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

regression: could not evaluate static initializer #123277

Closed
Mark-Simulacrum opened this issue Mar 31, 2024 · 4 comments
Closed

regression: could not evaluate static initializer #123277

Mark-Simulacrum opened this issue Mar 31, 2024 · 4 comments
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Mar 31, 2024

[INFO] [stdout] error[E0080]: could not evaluate static initializer
[INFO] [stdout]    --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/num/nonzero.rs:335:21
[INFO] [stdout]     |
[INFO] [stdout]     = note: entering unreachable code
[INFO] [stdout]     |
[INFO] [stdout] note: inside `NonZero::<u32>::new_unchecked`
[INFO] [stdout]    --> /rustc/c1195518c8ad7f37d15ecb82f39dec3da97f9c2f/library/core/src/num/nonzero.rs:335:21
[INFO] [stdout] note: inside `Entry::new`
[INFO] [stdout]    --> src/lib.rs:154:17
[INFO] [stdout]     |
[INFO] [stdout] 154 |                 NonZeroU32::new_unchecked(c as u32)
[INFO] [stdout]     |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout] note: inside `c`
[INFO] [stdout]    --> src/lib.rs:168:10
[INFO] [stdout]     |
[INFO] [stdout] 168 |     Some(Entry::new(c))
[INFO] [stdout]     |          ^^^^^^^^^^^^^
[INFO] [stdout] note: inside `MACROMAN`
[INFO] [stdout]    --> src/macroman.rs:2:2
[INFO] [stdout]     |
[INFO] [stdout] 2   |  c('\u{0000}'), c('\u{0001}'), c('\u{0002}'), c('\u{0003}'), c('\u{0004}'), c('\u{0005}'), c('\u{0006}'), c('\u{0007}'),
[INFO] [stdout]     |  ^^^^^^^^^^^^^

This looks like UB to me, so probably an expected regression from additional checking the compiler is performing.

@Mark-Simulacrum Mark-Simulacrum added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Mar 31, 2024
@Mark-Simulacrum Mark-Simulacrum added this to the 1.78.0 milestone Mar 31, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 31, 2024
@workingjubilee
Copy link
Member

workingjubilee commented Apr 1, 2024

seems pdf_encoding 0.4.0 already exists and carries the fix for this: https://crates.io/crates/pdf_encoding/0.4.0

@apiraino
Copy link
Contributor

apiraino commented Apr 2, 2024

Yes, specifically in this commit (IIUC)

The other two crates failing seems a bit older than pdf_rs, unsure if they're used depend on pdf_rs

@rustbot label -I-prioritize -needs-triage

@rustbot rustbot removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Apr 2, 2024
@Mark-Simulacrum Mark-Simulacrum added regression-from-stable-to-stable Performance or correctness regression from one stable version to another. and removed regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Oct 11, 2024
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 11, 2024
@apiraino
Copy link
Contributor

Can this be closed since fixed by downstream?

@rustbot label -I-prioritize

@rustbot rustbot removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Oct 12, 2024
@apiraino
Copy link
Contributor

Closing since regression is mentioned in the release notes

@apiraino apiraino closed this as not planned Won't fix, can't repro, duplicate, stale Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants