Comments on: NihAV: even further encoder improvements (original) (raw)

With rustc/catgo 1.83.0 on Gentoo linux with kernel 6.11.5 I get the following errors building NihAV. I got these before but had patched the code just enough so it would compile, but thought I’d share the errors:

error: this operation will panic at runtime
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-qt/src/codecs/qcelp.rs:274:17
|
274 | self.lsp_data[5] = br.read(1)? as usize;
| ^^^^^^^^^^^^^^^^ index out of bounds: the length is 5 but the index is 5
|
= note: `#[deny(unconditional_panic)]` on by default

error: this operation will panic at runtime
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-qt/src/codecs/qcelp.rs:276:17
|
276 | self.lsp_data[6] = br.read(1)? as usize;
| ^^^^^^^^^^^^^^^^ index out of bounds: the length is 5 but the index is 6

error: this operation will panic at runtime
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-qt/src/codecs/qcelp.rs:277:17
|
277 | self.lsp_data[7] = br.read(1)? as usize;
| ^^^^^^^^^^^^^^^^ index out of bounds: the length is 5 but the index is 7

error: this operation will panic at runtime
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-qt/src/codecs/qcelp.rs:278:17
|
278 | self.lsp_data[8] = br.read(1)? as usize;
| ^^^^^^^^^^^^^^^^ index out of bounds: the length is 5 but the index is 8

error: this operation will panic at runtime
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-qt/src/codecs/qcelp.rs:280:17
|
280 | self.lsp_data[9] = br.read(1)? as usize;
| ^^^^^^^^^^^^^^^^ index out of bounds: the length is 5 but the index is 9

error: avoid using labels containing only the digits `0` and `1` in inline assembly
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-itu/src/codecs/h264/dsp/mod.rs:1034:14
|
1034 | “1:”,
| ^ use a different label that doesn’t start with `0` or `1`
|
= help: start numbering with `2` instead
= note: an LLVM bug makes these labels ambiguous with a binary literal number on x86
= note: see for more information
= note: `#[deny(binary_asm_labels)]` on by default

error: avoid using labels containing only the digits `0` and `1` in inline assembly
–> /var/tmp/portage/media-video/nihav-0.1.0_p20250410/work/nihav/nihav-itu/src/codecs/h264/cabac_coder.rs:190:18
|
190 | “1:”,
| ^ use a different label that doesn’t start with `0` or `1`
|
= help: start numbering with `2` instead

]]>