Skip to content

Fix PAX protobuf array bounds warnings - #1982

Merged
leborchuk merged 1 commit into
apache:mainfrom
krylosov-aa:1677
Sep 11, 2026
Merged

Fix PAX protobuf array bounds warnings#1982
leborchuk merged 1 commit into
apache:mainfrom
krylosov-aa:1677

Conversation

@krylosov-aa

Copy link
Copy Markdown
Contributor

Fixes #1677

What does this PR do?

GCC 14 emits false -Warray-bounds warnings in protobuf 3.19 headers when compiling PAX.

Wrap the protobuf includes in proto_wrappers.h with GCC diagnostic push/pop directives. This suppresses the warnings within those headers and restores diagnostics afterwards.

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Test Plan

Validated on Ubuntu 22.04 ARM64:

  • GCC 14.3 with protobuf 3.19.6 and -O3: the three warnings in micro_partition_stats.cc and orc_format_reader.cc disappear, including with -Werror=array-bounds.
  • An intentional out-of-bounds access after the includes still triggers a compiler error.
  • PAX builds successfully; all 21 existing tests selected by MicroPartitionStatsTest.*:OrcTest.* pass.
  • Header compilation passes with GCC 11 and Clang 14 under strict warnings.

Rocky Linux 10 was not tested directly

Checklist

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @krylosov-aa welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!

@leborchuk leborchuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Suppress false GCC 14 array bounds warnings in protobuf 3.19 headers.
Limit the suppression to protobuf includes and restore diagnostics
for PAX code.

See: apache#1677
@leborchuk
leborchuk merged commit 238feec into apache:main Sep 11, 2026
187 of 191 checks passed
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.

[Bug] PAX compilation warings in Rocky Linux 10

3 participants