Skip to content

Use qualified member names in ODS sizeof expressions - #9199

Open
dand-oss wants to merge 1 commit into
FirebirdSQL:masterfrom
dand-oss:fix/ods-member-sizeof
Open

dand-oss wants to merge 1 commit into
FirebirdSQL:masterfrom
dand-oss:fix/ods-member-sizeof

Conversation

@dand-oss

@dand-oss dand-oss commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Replace the null-pointer member expressions in maxPagesPerSCN and gensPerPage with sizeof(scns_page::scn_pages) and sizeof(generator_page::gpg_values).

This is a readability cleanup, not a runtime null-dereference fix: sizeof does not evaluate these operands. The full array types and resulting page-capacity arithmetic remain unchanged.

Validation on Linux x86-64 with GCC 16.2 / C++20:

  • Compiled and linked the actual before/after ods.cpp with a focused harness and upstream's generated configuration headers.
  • Static assertions verify equality of the old and new sizeof operands.
  • Before/after results are identical for 4,096-, 8,192-, 16,384-, and 32,768-byte pages.
  • git diff --check passes.

A full patched server build has not been completed locally.

Use qualified member names in sizeof expressions. The operands remain unevaluated and the page-capacity calculations retain the same array sizes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants