Repository navigation
Fix build with OpenSSL 4.0 - #548
Merged
Merged
Conversation
The build will fail with the following undeclared identifier error:
memtier_benchmark.cpp:2133:18: error: use of undeclared identifier 'bitmask_is_contiguous'
2133 | if (!bitmask_is_contiguous(cfg->tls_protocols)) {
| ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
We can fix this by declaring it before it is used.
fcostaoliveira
approved these changes
Oct 6, 2026
fcostaoliveira
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for catching this, and for the clear repro in the description. The forward declaration sits under the same USE_TLS + OPENSSL_VERSION_NUMBER >= 0x40000000L guards as the definition, so nothing changes for 3.x builds. LGTM.
I guess the real gap is that we don't build against OpenSSL 4.0 in CI at all, which is how #444 got in like this — that's on us, not something for this PR. We'll also want this on the 2.5 branch.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The build will fail with the following undeclared identifier error:
We can fix this by declaring it before it is used.
Note
Low Risk
Compile-order fix only; no change to TLS validation logic beyond making OpenSSL 4.0 builds succeed.
Overview
Fixes OpenSSL 4.0 builds where
memtier_benchmark.cppfailed to compile becausebitmask_is_contiguouswas used in--tls-protocolsparsing before its definition (which lives much later in the file).Adds a
#if OPENSSL_VERSION_NUMBER >= 0x40000000Lforward declaration next to the existing TLS protocol defaults so the OpenSSL 4.0-only validation (rejecting non-contiguous protocol bitmasks when per-version disable flags are gone) can compile without changing runtime behavior.Reviewed by Cursor Bugbot for commit c035b33. Bugbot is set up for automated code reviews on this repo. Configure here.