Skip to content

THRIFT-6213: Define the TConfiguration default constants in the library - #3973

Open
slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:THRIFT-6213
Open

slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:THRIFT-6213

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Adds TConfiguration.cpp with out-of-line definitions of DEFAULT_MAX_MESSAGE_SIZE, DEFAULT_MAX_FRAME_SIZE and DEFAULT_RECURSION_DEPTH, so binding one to a reference links before C++17. The new test takes each constant's address through a volatile pointer, which needs the definitions at any optimisation level; on master it fails to link even in a Release build.

Verified: Ubuntu 24.04 arm64, GCC 13, C++11 — Debug build of UnitTests links and passes 141/141 (fails to link on master); TTransportFactoryConfigTest 11/11 in Debug and Release.

Client: cpp

Before C++17 an odr-used static const member needs this out-of-line
definition; drop it only once the constants become inline constexpr.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergeable mergeable Bot added c++ Pull requests that update C++ code build and general CI cmake, automake and build system changes labels Sep 28, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 28, 2026 18:10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build and general CI cmake, automake and build system changes c++ Pull requests that update C++ code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant