-
Notifications
You must be signed in to change notification settings - Fork 13.3k
thread rustc
panicked at Box<dyn Any>
#97885
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
Labels
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.
Comments
rustc
panicked at Box<dyn Any>
Same error here, but with
Backtrace
|
Function causing this issue: pub fn encode(buffer: Vec<u8>, compress: bool, encrypt: Option<Aes256Gcm>) -> Vec<u8> {
if compress {
let zlib = ZlibEncoder::new(buffer, Compression::best());
let compressed = zlib.finish().unwrap();
if encrypt.is_some() {
let nonce_bytes = random_number(96);
let nonce = Nonce::from_slice(&nonce_bytes);
let no_size: &[u8] = &vec_to_array(compressed);
let encrypted = encrypt.unwrap().encrypt(nonce, no_size).unwrap();
let result = Vec::new();
result.append(&mut nonce_bytes);
result.append(&mut encrypted);
result
} else {
compressed
}
} else {
if encrypt.is_some() {
let nonce_bytes = random_number(96);
let nonce = Nonce::from_slice(&nonce_bytes);
let no_size: &[u8] = &vec_to_array(buffer);
let encrypted = encrypt.unwrap().encrypt(nonce, no_size).unwrap();
let result = Vec::new();
result.append(&mut nonce_bytes);
result.append(&mut encrypted);
result
} else {
buffer
}
}
} |
Could have been introduced by #89862. |
Closed
It seems that this issue may be caused by a bug in your code, you can try reverting to |
I run into the same problem ICE with 2022-06-07Meta
Error with stable
|
Closing as duplicate of closed #97698. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
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.
Code
Meta
rustc --version --verbose
:cat /proc/version
Error output
Backtrace
The text was updated successfully, but these errors were encountered: