Skip to content

[VL] Fix GCC 11 compilation of S3 bucket config parsing - #13664

Merged
philo-he merged 3 commits into
apache:mainfrom
felipepessoto:felipepessoto-gcc-11-s3-regression
Nov 20, 2026
Merged

philo-he merged 3 commits into
apache:mainfrom
felipepessoto:felipepessoto-gcc-11-s3-regression

Conversation

@felipepessoto

@felipepessoto felipepessoto commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Follow up on #13646 without reverting its dotted-bucket S3A configuration support.

Pass suffix.size() explicitly to the suffix string_view::substr comparison. The existing length guard and computed position already identify exactly this range; supplying its length avoids the default npos substring path that GCC 11 propagates into the comparison. Keep the bucket-name parsing, longest-match selection, malformed-key handling, and all warning flags unchanged.

Extend GlutenS3FileSystemTest.extractsPerBucketConfigs with the one-character bucket boundary and suffix near misses (same-length mismatch, trailing dot, and trailing extra option).

The regression was observed in the Ubuntu 22.04 weekly native build: GCC 11 reports __builtin_memcmp_eq with bound 18446744073709551615 at the new suffix comparison and fails with -Werror=stringop-overread.

How was this patch tested?

  • weekly-build-on-macos is expected to fail, it is already failing before these changes: https://github.com/apache/gluten/actions/runs/43755616164/job/132938935814, and is addressed by [VL] Backport Flex lexer compatibility for macOS #13665

  • Reproduced the exact diagnostic in an Ubuntu 22.04 Docker container using the same GCC/G++ package as the failing job: 11.4.0-1ubuntu1~22.04.3. A standalone reduction extracts the production suffix table, parser lambda, and bucket-conversion loop. With -O3 -std=gnu++20 -DENABLE_S3 -Wall -Wextra -Werror, the original code fails and the patched workspace code compiles cleanly. No warning suppression is used.

  • Checked 120 recognized key mappings across eight bucket-name strings, plus 15 malformed-key cases. The original parser at -O0, patched parser at -O3, and patched parser with AddressSanitizer/UndefinedBehaviorSanitizer all pass these checks.

  • Ran dev/format-cpp-code.sh with clang-format 15.0.7, the repository license-header checker on both changed files, and git diff --check.

This is a reduced compiler/behavior regression check, not a full Gluten/Velox build. The native dependency/build tree is absent from this Windows worktree, so the integrated S3 test suite has not been run locally. A temporary comment-only build/mvn change triggered the weekly matrix for this PR and has now been removed; Maven behavior and the workflow's triggers are unchanged.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: GitHub Copilot 1.0.106-8.unstable.r43566476370.g869eef3 (GPT-6 Astra)

Bound the suffix substring explicitly while preserving dotted bucket parsing and exact suffix matching. Extend coverage for the minimum bucket-name boundary and suffix near misses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 23:48
@github-actions github-actions Bot added the VELOX label Nov 17, 2026

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the GCC 11 S3 configuration parsing fix.

No open issues 🎉

What changed in this PR

Addresses the GCC 11 compilation failure in Velox S3 configuration parsing while preserving dotted-bucket support introduced in #13646.

Changes:

  • Explicitly bounds the suffix substring comparison without changing parsing behavior or warning flags.
  • Extends regression tests with a one-character bucket name and suffix near misses.
File Description
cpp/​velox/​utils/​ConfigExtractor.cc Supplies the explicit suffix length to avoid GCC 11’s overread diagnostic.
cpp/​velox/​tests/​GlutenS3FileSystemTest.cc Adds boundary and malformed-suffix cases; updates the expected configuration count.

Review effort: Balanced

Add one CI-only comment to build/mvn so the existing weekly workflow path filter selects this PR. Maven behavior and the workflow remain unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 00:27

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the S3 configuration parsing fix.

No open issues 🎉

Review effort: Balanced

@pratham76 pratham76 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. Thanks for Fixing this issue

@pratham76

Copy link
Copy Markdown
Contributor

@zhouyuan This seems to be fixing an issue caused by #13664. PTAL

@felipepessoto

felipepessoto commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

@philo-he @rui-mo could you take a look, please?

Please let me know if I should leave or remove the dummy change to build/mvn. I did it to trigger CI

Comment thread build/mvn Resolved
@zhouyuan

Copy link
Copy Markdown
Member

@felipepessoto Thanks for the patch! There is a failure on weekly Macos build, could you please also fix it?
https://github.com/apache/gluten/actions/runs/44208008431/job/134478856253?pr=13664

ndefined symbols for architecture arm64:
  "yyFlexLexer::yyread(char*, unsigned long)", referenced from:
      vtable for yyFlexLexer in libvelox.a[22](YyFlexLexerShim.cpp.o)
ld: symbol(s) not found for architecture arm64

@felipepessoto

felipepessoto commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

@felipepessoto Thanks for the patch! There is a failure on weekly Macos build, could you please also fix it? https://github.com/apache/gluten/actions/runs/44208008431/job/134478856253?pr=13664

ndefined symbols for architecture arm64:
  "yyFlexLexer::yyread(char*, unsigned long)", referenced from:
      vtable for yyFlexLexer in libvelox.a[22](YyFlexLexerShim.cpp.o)
ld: symbol(s) not found for architecture arm64

@zhouyuan this error is addressed by #13665 #13686

Remove the comment-only build/mvn change now that the S3 fix has been reviewed. Restore the wrapper to its original contents without changing Maven behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 23:03

Copilot AI 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.

🟢 Approval recommended

No active review issues block the S3 configuration parser compatibility fix.

No open issues 🎉

Review effort: Balanced

@philo-he philo-he left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thanks!

@philo-he
philo-he merged commit 1893345 into apache:main Nov 20, 2026
42 checks passed
@felipepessoto
felipepessoto deleted the felipepessoto-gcc-11-s3-regression branch November 20, 2026 10:25
ReemaAlzaid pushed a commit to ReemaAlzaid/gluten that referenced this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants