Skip to content

rgw: VLAs are no longer welcome - #68014

Merged
adamemerson merged 23 commits into
ceph:mainfrom
adamemerson:wip-rgw-no-vla
May 13, 2026
Merged

adamemerson merged 23 commits into
ceph:mainfrom
adamemerson:wip-rgw-no-vla

Conversation

@adamemerson

@adamemerson adamemerson commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

Rebased and cleaned up.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

Leaving them out results in link errors on unoptimized debug builds.

Signed-off-by: Adam C. Emerson <[email protected]>
To convert case and separators.

Signed-off-by: Adam C. Emerson <[email protected]>
Replacing the dimensions of an array that had been a regular int with
a constexpr.

Signed-off-by: Adam C. Emerson <[email protected]>
This is not a good function and it should be revisisted later.

Signed-off-by: Adam C. Emerson <[email protected]>
And make other modernizations.

Signed-off-by: Adam C. Emerson <[email protected]>
By eliminating `{upper,lower}case_underscore_http_attr` and using
`{upper,lower}case_dash_transform` instead.

Signed-off-by: Adam C. Emerson <[email protected]>
This was surprisingly more involved than you would think.

Signed-off-by: Adam C. Emerson <[email protected]>
Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@chardan chardan 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! Thank you for reorganizing some of these things. I am really happy to see this happen-- greatly appreciated!

Comment thread src/cls/rgw/cls_rgw.cc Resolved
Comment thread src/cls/CMakeLists.txt Resolved
Comment thread src/cls/otp/cls_otp.cc Resolved
Comment thread src/rgw/driver/daos/rgw_sal_daos.cc Resolved
Comment thread src/rgw/rgw_common.h Resolved
Comment thread src/rgw/rgw_common.h Resolved
Comment thread src/rgw/rgw_rest_swift.cc Resolved
Comment thread src/CMakeLists.txt Resolved
@nhoad

nhoad commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

What's the context on this?

@adamemerson

Copy link
Copy Markdown
Contributor Author

What's the context on this?

VLAs are dangerous, error prone, and not actually part of standard C++.

@chardan

chardan commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

@nhoad Everything @adamemerson said. In particular C99 VLAs offer no way to detect overflow or capacity, and (this cannot be overstated) are very easy to use unintentionally. Code built around them can silently "work" for years and then explode, and the resultant bugs are often very difficult to track down. C++ deliberately did not adopt the version of them used by C99.

@ivancich

Copy link
Copy Markdown
Member

@adamemerson

Copy link
Copy Markdown
Contributor Author

@adamemerson On the QA run that has this and only one other PR in it I'm seeing a new error -- "test_bucket_logging_request_id". Given how many files this touches, is there any way this is responsible. I don't see this failure on other main branch based QA runs.

Here are the log files:

* https://qa-proxy.ceph.com/teuthology/anuchaithra-2026-05-12_15:36:29-rgw-wip-anrao5-testing-2026-05-12-1430-distro-default-trial/210422/teuthology.log

* https://qa-proxy.ceph.com/teuthology/anuchaithra-2026-05-12_15:36:29-rgw-wip-anrao5-testing-2026-05-12-1430-distro-default-trial/210425/teuthology.log

I shall investigate!

@adamemerson
adamemerson merged commit 4d5cdb6 into ceph:main May 13, 2026
15 of 19 checks passed
@adamemerson
adamemerson deleted the wip-rgw-no-vla branch May 13, 2026 21:00
@anrao19

anrao19 commented May 14, 2026

Copy link
Copy Markdown
Contributor

pr testing completed and got approval from @ivancich , tracker details: https://tracker.ceph.com/issues/76554.

batrick pushed a commit that referenced this pull request Aug 19, 2026
These functions for translating between HTTP header and environment
format are used in the fix.

They were included in commit 966f5c6 as part of PR [rgw: VLAs are
no longer welcome](#68014).

Signed-off-by: Adam C. Emerson <[email protected]>
batrick pushed a commit that referenced this pull request Aug 19, 2026
These functions for translating between HTTP header and environment
format are used in the fix.

They were included in commit 966f5c6 as part of PR [rgw: VLAs are
no longer welcome](#68014).

Signed-off-by: Adam C. Emerson <[email protected]>
mertsunacoglu pushed a commit to mertsunacoglu/ceph that referenced this pull request Aug 26, 2026
These functions for translating between HTTP header and environment
format are used in the fix.

They were included in commit 966f5c6 as part of PR [rgw: VLAs are
no longer welcome](ceph#68014).

Signed-off-by: Adam C. Emerson <[email protected]>
jrse pushed a commit to jrse/ceph that referenced this pull request Sep 25, 2026
These functions for translating between HTTP header and environment
format are used in the fix.

They were included in commit 966f5c6 as part of PR [rgw: VLAs are
no longer welcome](ceph#68014).

Signed-off-by: Adam C. Emerson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants