Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
glslangValidator --version
- name: Configure + build
run: meson setup build && ninja -C build
- name: Optimised gcc build (-O2, warnings are errors)
# gcc raises -Wmaybe-uninitialized only with the optimiser on, which the
# default debug build above does not run.
run: CC=gcc meson setup build-o2 --buildtype=debugoptimized && ninja -C build-o2
- name: Test (fast suite — interop ABI + shader compile)
run: meson test -C build --suite=fast --print-errorlogs
- name: clang-format (touched-tree clean)
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ All notable changes to Pelorus are documented here. The format is
`base` and `n1.2.3` branches and wrote `core.hooksPath`, `commit.gpgsign` and
`user.name` into the repository's config. The checker now drops the
repository-selecting variables first, and a regression proves it.
- **The x265 CSV reader initialises its column indices before the header row
sets them.** `x265_csv_read_rows()` left the column-index struct
uninitialised until the header was read, and gcc 16 at `-O2` reported seven
`-Wmaybe-uninitialized` warnings (`type`, `poc`, `qp`, `bits`, `psnr_y/u/v`).
Every index now starts at -1 ("absent"), which the readers already treat as a
missing column, so behaviour is unchanged. CI gains an optimised gcc build
with warnings as errors; the default debug build never ran the optimiser and
could not see this class of warning.

### Security

Expand Down
8 changes: 8 additions & 0 deletions changelog.d/fixed/qp-report-csv-cols-initialised.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- **The x265 CSV reader initialises its column indices before the header row
sets them.** `x265_csv_read_rows()` left the column-index struct
uninitialised until the header was read, and gcc 16 at `-O2` reported seven
`-Wmaybe-uninitialized` warnings (`type`, `poc`, `qp`, `bits`, `psnr_y/u/v`).
Every index now starts at -1 ("absent"), which the readers already treat as a
missing column, so behaviour is unchanged. CI gains an optimised gcc build
with warnings as errors; the default debug build never ran the optimiser and
could not see this class of warning.
4 changes: 3 additions & 1 deletion libpelorus/src/qp_report_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ static pel_result x265_csv_read_rows(FILE *fp, PelorusX265Frame *out_frames, siz
{
char line[PEL_CSV_LINE_MAX]; /* bounded, fixed (Po10): no heap, no VLA */
char *fields[PEL_CSV_MAX_FIELDS];
csv_cols cols;
/* Every index starts "absent" (-1): a row is then never admitted before a header has set the
* real indices, and the compiler sees a defined value on every path. */
csv_cols cols = {-1, -1, -1, -1, -1, -1, -1};

while (fgets(line, (int)sizeof(line), fp) != NULL) {
size_t nf = split_fields(line, fields, PEL_CSV_MAX_FIELDS);
Expand Down